From 82741605206382d0afd879c4bce174ef3d6e8aea Mon Sep 17 00:00:00 2001 From: marton bognar Date: Fri, 7 Jul 2017 00:23:49 +0200 Subject: [PATCH] Fixed #28361 -- Fixed possible time-related failure in was_published_recently() tutorial test. Regression in 268a646353c6fa9e5fc3730e13b386ddabb018ef. --- docs/intro/tutorial05.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/intro/tutorial05.txt b/docs/intro/tutorial05.txt index aad693c0dc..88901cd5c1 100644 --- a/docs/intro/tutorial05.txt +++ b/docs/intro/tutorial05.txt @@ -285,7 +285,7 @@ more comprehensively: was_published_recently() returns False for questions whose pub_date 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) self.assertIs(old_question.was_published_recently(), False)