diff options
author | mendespedro <windowsxpedro@gmail.com> | 2021-12-15 13:56:04 -0300 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-12-20 06:46:34 +0100 |
commit | 4fd3044ca0135da903a70dfb66992293f529ecf1 (patch) | |
tree | 5884d724f07c6d3c39d9477cec8093796a239f1c /tests/forms_tests | |
parent | b0d16d0129b7cc5978a8d55d2331a34cb369e6c7 (diff) | |
download | django-4fd3044ca0135da903a70dfb66992293f529ecf1.tar.gz |
Fixed #33368 -- Fixed parse_duration() crash on invalid separators for decimal fractions.
Diffstat (limited to 'tests/forms_tests')
-rw-r--r-- | tests/forms_tests/field_tests/test_durationfield.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/forms_tests/field_tests/test_durationfield.py b/tests/forms_tests/field_tests/test_durationfield.py index f5125aa571..dae139446d 100644 --- a/tests/forms_tests/field_tests/test_durationfield.py +++ b/tests/forms_tests/field_tests/test_durationfield.py @@ -30,6 +30,8 @@ class DurationFieldTest(FormFieldAssertionsMixin, SimpleTestCase): msg = 'Enter a valid duration.' with self.assertRaisesMessage(ValidationError, msg): f.clean('not_a_time') + with self.assertRaisesMessage(ValidationError, msg): + DurationField().clean('P3(3D') def test_durationfield_clean_not_required(self): f = DurationField(required=False) |