Browse Source

Fixed #28361 -- Fixed possible time-related failure in was_published_recently() tutorial test.

Regression in 268a646353c6fa9e5fc3730e13b386ddabb018ef.
marton bognar 7 years ago
parent
commit
8274160520
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/intro/tutorial05.txt

+ 1 - 1
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)