diff options
| author | yakimka <ss.yakim@gmail.com> | 2021-07-15 21:27:59 +0300 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-07-21 11:23:43 +0200 |
| commit | 134638176080eba48b9b3a2e484bfee1cb8beaec (patch) | |
| tree | 6851d418307e9e62a9a8042aea191d62ba88d6b1 /tests/forms_tests/field_tests | |
| parent | 05e997c40490776b6c0e13806800d6b125e53107 (diff) | |
[3.2.x] Fixed #32949 -- Restored invalid number handling in DecimalField.validate().
DecimalField must itself validate() values, such as NaN, which cannot be
passed to validators, such as MaxValueValidator, during the
run_validators() phase.
Regression in cc3d24d7d577f174937a0744d886c4c7123cfa85.
Backport of c542d0a07237033225c1d57337ca9474a00648f2 from main
Diffstat (limited to 'tests/forms_tests/field_tests')
| -rw-r--r-- | tests/forms_tests/field_tests/test_decimalfield.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/forms_tests/field_tests/test_decimalfield.py b/tests/forms_tests/field_tests/test_decimalfield.py index d999dab3f3..df5b9052b2 100644 --- a/tests/forms_tests/field_tests/test_decimalfield.py +++ b/tests/forms_tests/field_tests/test_decimalfield.py @@ -49,7 +49,7 @@ class DecimalFieldTest(FormFieldAssertionsMixin, SimpleTestCase): self.assertIsNone(f.min_value) def test_enter_a_number_error(self): - f = DecimalField(max_digits=4, decimal_places=2) + f = DecimalField(max_value=1, max_digits=4, decimal_places=2) values = ( '-NaN', 'NaN', '+NaN', '-sNaN', 'sNaN', '+sNaN', |
