diff options
| author | Tim Graham <timograham@gmail.com> | 2016-03-10 09:22:09 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-03-10 19:16:20 -0500 |
| commit | 5b6c751230c7ec33eebc564c15ab299ef8f6852a (patch) | |
| tree | f8e765e80e611a52d6da96438cb7473c412e8f1a /tests/model_fields | |
| parent | 301edde86d07fe27a4aa002b1546d2a3002190dc (diff) | |
[1.9.x] Fixed #26324 -- Fixed DurationField with fractional seconds on SQLite.
Backport of 4f0cd0fd162122da96978b357ac9fc9534529410 from master
Diffstat (limited to 'tests/model_fields')
| -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): |
