diff options
| author | Alexander Gaevsky <sasha@sasha0.ru> | 2016-01-22 21:33:21 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-22 16:24:49 -0500 |
| commit | 956cde800490d2d9e1e5fcc83755a9226de27f24 (patch) | |
| tree | 2b3f1c2829c62f45c182b5b3abcab5f3cb9974d4 /tests | |
| parent | 95648eb5c141db7495789f34b64ef54bb0455b08 (diff) | |
Fixed #26104 -- Fixed TypeError when passing number to forms.DurationField.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/forms_tests/tests/test_fields.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/forms_tests/tests/test_fields.py b/tests/forms_tests/tests/test_fields.py index 80e17881ef..1bab912cfc 100644 --- a/tests/forms_tests/tests/test_fields.py +++ b/tests/forms_tests/tests/test_fields.py @@ -722,6 +722,10 @@ class FieldsTests(SimpleTestCase): str(f['duration']) ) + def test_durationfield_integer_value(self): + f = DurationField() + self.assertEqual(datetime.timedelta(0, 10800), f.clean(10800)) + def test_durationfield_prepare_value(self): field = DurationField() td = datetime.timedelta(minutes=15, seconds=30) |
