1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

[1.11.x] Fixed #28361 -- Fixed possible time-related failure in was_published_recently() tutorial test.

Regression in 268a646353.

Backport of 8274160520 from master
This commit is contained in:
marton bognar
2017-07-07 00:23:49 +02:00
committed by Tim Graham
parent 81febf4def
commit 5b450b84e1

View File

@@ -285,7 +285,7 @@ more comprehensively:
was_published_recently() returns False for questions whose pub_date was_published_recently() returns False for questions whose pub_date
is older than 1 day. is older than 1 day.
""" """
time = timezone.now() - datetime.timedelta(days=1) time = timezone.now() - datetime.timedelta(days=1, seconds=1)
old_question = Question(pub_date=time) old_question = Question(pub_date=time)
self.assertIs(old_question.was_published_recently(), False) self.assertIs(old_question.was_published_recently(), False)