diff options
| author | Tim Graham <timograham@gmail.com> | 2016-03-10 09:22:09 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-03-10 12:18:29 -0500 |
| commit | 4f0cd0fd162122da96978b357ac9fc9534529410 (patch) | |
| tree | a8a5a7e9d0fd999d7d2ae614ad2909bcb7accb2e /tests | |
| parent | 85a4844f8a8e628b90fa30ba7074f162a2d188ef (diff) | |
Fixed #26324 -- Fixed DurationField with fractional seconds on SQLite.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/model_fields/test_durationfield.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/model_fields/test_durationfield.py b/tests/model_fields/test_durationfield.py index fb26baadc9..82c5c875bf 100644 --- a/tests/model_fields/test_durationfield.py +++ b/tests/model_fields/test_durationfield.py @@ -22,6 +22,12 @@ class TestSaveLoad(TestCase): loaded = NullDurationModel.objects.get() self.assertEqual(loaded.field, None) + def test_fractional_seconds(self): + value = datetime.timedelta(seconds=2.05) + d = DurationModel.objects.create(field=value) + d.refresh_from_db() + self.assertEqual(d.field, value) + class TestQuerying(TestCase): |
