Ticket #24959: 24959-test.diff

File 24959-test.diff, 677 bytes (added by Tim Graham, 8 years ago)
  • tests/expressions/tests.py

    diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
    index e46fdab..7ad5e4f 100644
    a b class FTimeDeltaTests(TestCase):  
    10431043        ).order_by('name')
    10441044        self.assertQuerysetEqual(over_estimate, ['e3', 'e4'], lambda e: e.name)
    10451045
     1046    def test_negative_timedelta_update(self):
     1047        experiments = Experiment.objects.update(start=F('assigned') + datetime.timedelta(days=-2))
     1048        e0 = Experiment.objects.get(name='e0')
     1049        self.assertEqual(e0.assigned, datetime.date(2010, 6, 24))
     1050
    10461051
    10471052class ValueTests(TestCase):
    10481053    def test_update_TimeField_using_Value(self):
Back to Top