From b4870e71966db208e1dd3ab74c8a7beb7388f725 Mon Sep 17 00:00:00 2001 From: Jure Slak Date: Wed, 22 Mar 2023 07:48:15 +0100 Subject: [PATCH] Refs #34434 -- Added assertion for cleaning 0-0-0 for forms.DateField. --- tests/forms_tests/field_tests/test_datefield.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/forms_tests/field_tests/test_datefield.py b/tests/forms_tests/field_tests/test_datefield.py index a9f93f40ed..60c8043be3 100644 --- a/tests/forms_tests/field_tests/test_datefield.py +++ b/tests/forms_tests/field_tests/test_datefield.py @@ -149,6 +149,8 @@ class DateFieldTest(SimpleTestCase): f.clean("200a-10-25") with self.assertRaisesMessage(ValidationError, "'Enter a valid date.'"): f.clean("25/10/06") + with self.assertRaisesMessage(ValidationError, "'Enter a valid date.'"): + f.clean("0-0-0") with self.assertRaisesMessage(ValidationError, "'This field is required.'"): f.clean(None)