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
26dd518b
Kaydet (Commit)
26dd518b
authored
Eki 18, 2014
tarafından
Thomas Chaumeny
Kaydeden (comit)
Tim Graham
Ara 03, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refactored some tests to take advantage of refs #20392.
üst
da9fe5c7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
tests.py
tests/queries/tests.py
+0
-0
tests.py
tests/select_related/tests.py
+8
-12
No files found.
tests/queries/tests.py
Dosyayı görüntüle @
26dd518b
This diff is collapsed.
Click to expand it.
tests/select_related/tests.py
Dosyayı görüntüle @
26dd518b
...
...
@@ -7,7 +7,8 @@ from .models import Domain, Kingdom, Phylum, Klass, Order, Family, Genus, Specie
class
SelectRelatedTests
(
TestCase
):
def
create_tree
(
self
,
stringtree
):
@classmethod
def
create_tree
(
cls
,
stringtree
):
"""
Helper to create a complete tree.
"""
...
...
@@ -26,17 +27,12 @@ class SelectRelatedTests(TestCase):
obj
.
save
()
parent
=
obj
def
create_base_data
(
self
):
self
.
create_tree
(
"Eukaryota Animalia Anthropoda Insecta Diptera Drosophilidae Drosophila melanogaster"
)
self
.
create_tree
(
"Eukaryota Animalia Chordata Mammalia Primates Hominidae Homo sapiens"
)
self
.
create_tree
(
"Eukaryota Plantae Magnoliophyta Magnoliopsida Fabales Fabaceae Pisum sativum"
)
self
.
create_tree
(
"Eukaryota Fungi Basidiomycota Homobasidiomycatae Agaricales Amanitacae Amanita muscaria"
)
def
setUp
(
self
):
# The test runner sets settings.DEBUG to False, but we want to gather
# queries so we'll set it to True here and reset it at the end of the
# test case.
self
.
create_base_data
()
@classmethod
def
setUpTestData
(
cls
):
cls
.
create_tree
(
"Eukaryota Animalia Anthropoda Insecta Diptera Drosophilidae Drosophila melanogaster"
)
cls
.
create_tree
(
"Eukaryota Animalia Chordata Mammalia Primates Hominidae Homo sapiens"
)
cls
.
create_tree
(
"Eukaryota Plantae Magnoliophyta Magnoliopsida Fabales Fabaceae Pisum sativum"
)
cls
.
create_tree
(
"Eukaryota Fungi Basidiomycota Homobasidiomycatae Agaricales Amanitacae Amanita muscaria"
)
def
test_access_fks_without_select_related
(
self
):
"""
...
...
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