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
66394646
Kaydet (Commit)
66394646
authored
Haz 21, 2017
tarafından
François Freitag
Kaydeden (comit)
Tim Graham
Eyl 05, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed hardcoding from get_earliest_or_latest tests' tearDown().
üst
2ef4b479
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
tests.py
tests/get_earliest_or_latest/tests.py
+6
-3
No files found.
tests/get_earliest_or_latest/tests.py
Dosyayı görüntüle @
66394646
...
...
@@ -8,10 +8,13 @@ from .models import Article, IndexErrorArticle, Person
class
EarliestOrLatestTests
(
TestCase
):
"""Tests for the earliest() and latest() objects methods"""
@classmethod
def
setUpClass
(
cls
):
super
()
.
setUpClass
()
cls
.
_article_get_latest_by
=
Article
.
_meta
.
get_latest_by
def
tearDown
(
self
):
"""Makes sure Article has a get_latest_by"""
if
not
Article
.
_meta
.
get_latest_by
:
Article
.
_meta
.
get_latest_by
=
'pub_date'
Article
.
_meta
.
get_latest_by
=
self
.
_article_get_latest_by
def
test_earliest
(
self
):
# Because no Articles exist yet, earliest() raises ArticleDoesNotExist.
...
...
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