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
d6b8b125
Kaydet (Commit)
d6b8b125
authored
Agu 14, 2012
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[py3] Fixed admin_custom_urls tests.
üst
0c198b85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
models.py
tests/regressiontests/admin_custom_urls/models.py
+1
-1
tests.py
tests/regressiontests/admin_custom_urls/tests.py
+1
-4
No files found.
tests/regressiontests/admin_custom_urls/models.py
Dosyayı görüntüle @
d6b8b125
...
...
@@ -28,7 +28,7 @@ class ActionAdmin(admin.ModelAdmin):
Remove all entries named 'name' from the ModelAdmin instance URL
patterns list
"""
return
filter
(
lambda
e
:
e
.
name
!=
name
,
super
(
ActionAdmin
,
self
)
.
get_urls
())
return
[
url
for
url
in
super
(
ActionAdmin
,
self
)
.
get_urls
()
if
url
.
name
!=
name
]
def
get_urls
(
self
):
# Add the URL of our custom 'add_view' view to the front of the URLs
...
...
tests/regressiontests/admin_custom_urls/tests.py
Dosyayı görüntüle @
d6b8b125
...
...
@@ -29,10 +29,7 @@ class AdminCustomUrlsTest(TestCase):
def
testAddWithGETArgs
(
self
):
response
=
self
.
client
.
get
(
'/custom_urls/admin/admin_custom_urls/action/!add/'
,
{
'name'
:
'My Action'
})
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertTrue
(
'value="My Action"'
in
response
.
content
,
"Couldn't find an input with the right value in the response."
)
self
.
assertContains
(
response
,
'value="My Action"'
)
def
testBasicAddPost
(
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