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
eda12cee
Kaydet (Commit)
eda12cee
authored
May 16, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed redundant list() calls.
üst
c2bc1cef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
query_utils.py
django/db/models/query_utils.py
+1
-1
tests.py
tests/httpwrappers/tests.py
+4
-4
test_datastructures.py
tests/utils_tests/test_datastructures.py
+3
-3
No files found.
django/db/models/query_utils.py
Dosyayı görüntüle @
eda12cee
...
@@ -229,7 +229,7 @@ def deferred_class_factory(model, attrs):
...
@@ -229,7 +229,7 @@ def deferred_class_factory(model, attrs):
# class won't be created (we get an exception). Therefore, we generate
# class won't be created (we get an exception). Therefore, we generate
# the name using the passed in attrs. It's OK to reuse an existing class
# the name using the passed in attrs. It's OK to reuse an existing class
# object if the attrs are identical.
# object if the attrs are identical.
name
=
"
%
s_Deferred_
%
s"
%
(
model
.
__name__
,
'_'
.
join
(
sorted
(
list
(
attrs
)
)))
name
=
"
%
s_Deferred_
%
s"
%
(
model
.
__name__
,
'_'
.
join
(
sorted
(
attrs
)))
name
=
utils
.
truncate_name
(
name
,
80
,
32
)
name
=
utils
.
truncate_name
(
name
,
80
,
32
)
try
:
try
:
...
...
tests/httpwrappers/tests.py
Dosyayı görüntüle @
eda12cee
...
@@ -140,13 +140,13 @@ class QueryDictTests(unittest.TestCase):
...
@@ -140,13 +140,13 @@ class QueryDictTests(unittest.TestCase):
self
.
assertTrue
(
q
.
has_key
(
'foo'
))
self
.
assertTrue
(
q
.
has_key
(
'foo'
))
self
.
assertIn
(
'foo'
,
q
)
self
.
assertIn
(
'foo'
,
q
)
self
.
assertListEqual
(
sorted
(
list
(
six
.
iteritems
(
q
)
)),
self
.
assertListEqual
(
sorted
(
six
.
iteritems
(
q
)),
[(
'foo'
,
'another'
),
(
'name'
,
'john'
)])
[(
'foo'
,
'another'
),
(
'name'
,
'john'
)])
self
.
assertListEqual
(
sorted
(
list
(
six
.
iterlists
(
q
)
)),
self
.
assertListEqual
(
sorted
(
six
.
iterlists
(
q
)),
[(
'foo'
,
[
'bar'
,
'baz'
,
'another'
]),
(
'name'
,
[
'john'
])])
[(
'foo'
,
[
'bar'
,
'baz'
,
'another'
]),
(
'name'
,
[
'john'
])])
self
.
assertListEqual
(
sorted
(
list
(
six
.
iterkeys
(
q
)
)),
self
.
assertListEqual
(
sorted
(
six
.
iterkeys
(
q
)),
[
'foo'
,
'name'
])
[
'foo'
,
'name'
])
self
.
assertListEqual
(
sorted
(
list
(
six
.
itervalues
(
q
)
)),
self
.
assertListEqual
(
sorted
(
six
.
itervalues
(
q
)),
[
'another'
,
'john'
])
[
'another'
,
'john'
])
q
.
update
({
'foo'
:
'hello'
})
q
.
update
({
'foo'
:
'hello'
})
...
...
tests/utils_tests/test_datastructures.py
Dosyayı görüntüle @
eda12cee
...
@@ -32,12 +32,12 @@ class MultiValueDictTests(SimpleTestCase):
...
@@ -32,12 +32,12 @@ class MultiValueDictTests(SimpleTestCase):
self
.
assertEqual
(
d
.
get
(
'name'
),
'Simon'
)
self
.
assertEqual
(
d
.
get
(
'name'
),
'Simon'
)
self
.
assertEqual
(
d
.
getlist
(
'name'
),
[
'Adrian'
,
'Simon'
])
self
.
assertEqual
(
d
.
getlist
(
'name'
),
[
'Adrian'
,
'Simon'
])
self
.
assertEqual
(
self
.
assertEqual
(
sorted
(
list
(
six
.
iteritems
(
d
)
)),
sorted
(
six
.
iteritems
(
d
)),
[(
'name'
,
'Simon'
),
(
'position'
,
'Developer'
)]
[(
'name'
,
'Simon'
),
(
'position'
,
'Developer'
)]
)
)
self
.
assertEqual
(
self
.
assertEqual
(
sorted
(
list
(
six
.
iterlists
(
d
)
)),
sorted
(
six
.
iterlists
(
d
)),
[(
'name'
,
[
'Adrian'
,
'Simon'
]),
(
'position'
,
[
'Developer'
])]
[(
'name'
,
[
'Adrian'
,
'Simon'
]),
(
'position'
,
[
'Developer'
])]
)
)
...
@@ -52,7 +52,7 @@ class MultiValueDictTests(SimpleTestCase):
...
@@ -52,7 +52,7 @@ class MultiValueDictTests(SimpleTestCase):
d
.
setlist
(
'lastname'
,
[
'Holovaty'
,
'Willison'
])
d
.
setlist
(
'lastname'
,
[
'Holovaty'
,
'Willison'
])
self
.
assertEqual
(
d
.
getlist
(
'lastname'
),
[
'Holovaty'
,
'Willison'
])
self
.
assertEqual
(
d
.
getlist
(
'lastname'
),
[
'Holovaty'
,
'Willison'
])
self
.
assertEqual
(
sorted
(
list
(
six
.
itervalues
(
d
)
)),
self
.
assertEqual
(
sorted
(
six
.
itervalues
(
d
)),
[
'Developer'
,
'Simon'
,
'Willison'
])
[
'Developer'
,
'Simon'
,
'Willison'
])
def
test_appendlist
(
self
):
def
test_appendlist
(
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