Ticket #23450: 23450.diff

File 23450.diff, 771 bytes (added by Tim Graham, 10 years ago)
  • tests/requests/tests.py

    diff --git a/tests/requests/tests.py b/tests/requests/tests.py
    index 2f3bace..bb36af3 100644
    a b class RequestsTests(SimpleTestCase):  
    201201        response = HttpResponse()
    202202        response.set_cookie('datetime', expires=datetime(2028, 1, 1, 4, 5, 6))
    203203        datetime_cookie = response.cookies['datetime']
    204         self.assertEqual(datetime_cookie['expires'], 'Sat, 01-Jan-2028 04:05:06 GMT')
     204        self.assertIn(
     205            datetime_cookie['expires'],
     206            # Slight time dependency; refs #23450
     207            ('Sat, 01-Jan-2028 04:05:06 GMT', 'Sat, 01-Jan-2028 04:05:07 GMT')
     208        )
    205209
    206210    def test_max_age_expiration(self):
    207211        "Cookie will expire if max_age is provided"
Back to Top