Пример #1
0
 def test_was_recently_published_future(self):
     time = timezone.now() + datetime.timedelta(days=10)
     chirp = Chirp(message="Test", title="Title", posted_at=time)
     self.assertFalse(chirp.was_published_recently(), "Chirp future not recent")
Пример #2
0
 def test_was_recently_published_old_chirp(self):
     time = timezone.now() - datetime.timedelta(days=30)
     chirp = Chirp(message="Test", title="title", posted_at=time)
     self.assertFalse(chirp.was_published_recently(), "Chirp not recent")