Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
268a6463
Kaydet (Commit)
268a6463
authored
Haz 06, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated was_published_recently() tutorial test to check boundary condition.
üst
23142eea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tutorial05.txt
docs/intro/tutorial05.txt
+2
-2
No files found.
docs/intro/tutorial05.txt
Dosyayı görüntüle @
268a6463
...
@@ -285,7 +285,7 @@ more comprehensively:
...
@@ -285,7 +285,7 @@ more comprehensively:
was_published_recently() should return False for questions whose
was_published_recently() should return False for questions whose
pub_date is older than 1 day.
pub_date is older than 1 day.
"""
"""
time = timezone.now() - datetime.timedelta(days=
30
)
time = timezone.now() - datetime.timedelta(days=
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)
...
@@ -294,7 +294,7 @@ more comprehensively:
...
@@ -294,7 +294,7 @@ more comprehensively:
was_published_recently() should return True for questions whose
was_published_recently() should return True for questions whose
pub_date is within the last day.
pub_date is within the last day.
"""
"""
time = timezone.now() - datetime.timedelta(hours=
1
)
time = timezone.now() - datetime.timedelta(hours=
23, minutes=59, seconds=59
)
recent_question = Question(pub_date=time)
recent_question = Question(pub_date=time)
self.assertIs(recent_question.was_published_recently(), True)
self.assertIs(recent_question.was_published_recently(), True)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment