summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authormarton bognar <martonbognar@users.noreply.github.com>2017-07-07 00:23:49 +0200
committerTim Graham <timograham@gmail.com>2017-07-06 18:24:04 -0400
commit5b450b84e14f42302f58ec1f15a67a368e64d85c (patch)
treeedf375f475cac06e59cc66ed29301e5952bb85a8 /docs
parent81febf4defe6f6da2dea80f24082b282b8bf30ca (diff)
[1.11.x] Fixed #28361 -- Fixed possible time-related failure in was_published_recently() tutorial test.
Regression in 268a646353c6fa9e5fc3730e13b386ddabb018ef. Backport of 82741605206382d0afd879c4bce174ef3d6e8aea from master
Diffstat (limited to 'docs')
-rw-r--r--docs/intro/tutorial05.txt2
1 files changed, 1 insertions, 1 deletions
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)