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
9699d844
Kaydet (Commit)
9699d844
authored
Ara 24, 2014
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved test correction from
5b1fb0a7
üst
8842bc10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
tests.py
tests/indexes/tests.py
+10
-10
No files found.
tests/indexes/tests.py
Dosyayı görüntüle @
9699d844
...
...
@@ -12,16 +12,8 @@ class CreationIndexesTests(TestCase):
Test index handling by the to-be-deprecated connection.creation interface.
"""
def
test_index_together
(
self
):
editor
=
connection
.
schema_editor
()
index_sql
=
editor
.
_model_indexes_sql
(
Article
)
index_sql
=
connection
.
creation
.
sql_indexes_for_model
(
Article
,
no_style
())
self
.
assertEqual
(
len
(
index_sql
),
1
)
# Ensure the index name is properly quoted
self
.
assertIn
(
connection
.
ops
.
quote_name
(
editor
.
_create_index_name
(
Article
,
[
'headline'
,
'pub_date'
],
suffix
=
'_idx'
)
),
index_sql
[
0
]
)
def
test_index_together_single_list
(
self
):
# Test for using index_together with a single list (#22172)
...
...
@@ -54,8 +46,16 @@ class SchemaIndexesTests(TestCase):
Test index handling by the db.backends.schema infrastructure.
"""
def
test_index_together
(
self
):
index_sql
=
connection
.
schema_editor
()
.
_model_indexes_sql
(
Article
)
editor
=
connection
.
schema_editor
()
index_sql
=
editor
.
_model_indexes_sql
(
Article
)
self
.
assertEqual
(
len
(
index_sql
),
1
)
# Ensure the index name is properly quoted
self
.
assertIn
(
connection
.
ops
.
quote_name
(
editor
.
_create_index_name
(
Article
,
[
'headline'
,
'pub_date'
],
suffix
=
'_idx'
)
),
index_sql
[
0
]
)
def
test_index_together_single_list
(
self
):
# Test for using index_together with a single list (#22172)
...
...
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