Ticket #26324: 26324-test.diff

File 26324-test.diff, 621 bytes (added by Tim Graham, 9 years ago)
  • tests/model_fields/test_durationfield.py

    diff --git a/tests/model_fields/test_durationfield.py b/tests/model_fields/test_durationfield.py
    index fb26baa..82c5c87 100644
    a b class TestSaveLoad(TestCase):  
    2222        loaded = NullDurationModel.objects.get()
    2323        self.assertEqual(loaded.field, None)
    2424
     25    def test_fractional_seconds(self):
     26        value = datetime.timedelta(seconds=2.05)
     27        d = DurationModel.objects.create(field=value)
     28        d.refresh_from_db()
     29        self.assertEqual(d.field, value)
     30
    2531
    2632class TestQuerying(TestCase):
    2733
Back to Top