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
118faa08
Kaydet (Commit)
118faa08
authored
Nis 10, 2013
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Made usage of assertTemplateUsed in admin_views tests
Thanks Baptiste Mispelon for the suggestion.
üst
18255779
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests.py
tests/admin_views/tests.py
+3
-3
No files found.
tests/admin_views/tests.py
Dosyayı görüntüle @
118faa08
...
...
@@ -647,7 +647,7 @@ class AdminViewFormUrlTest(TestCase):
os
.
path
.
join
(
os
.
path
.
dirname
(
upath
(
__file__
)),
'templates'
),)
with
self
.
settings
(
TEMPLATE_DIRS
=
template_dirs
):
response
=
self
.
client
.
get
(
"/test_admin/admin/admin_views/color2/"
)
self
.
assertT
rue
(
'custom_filter_template.html'
in
[
t
.
name
for
t
in
response
.
templates
]
)
self
.
assertT
emplateUsed
(
response
,
'custom_filter_template.html'
)
@override_settings
(
PASSWORD_HASHERS
=
(
'django.contrib.auth.hashers.SHA1PasswordHasher'
,))
...
...
@@ -3982,7 +3982,7 @@ class AdminViewLogoutTest(TestCase):
def
test_client_logout_url_can_be_used_to_login
(
self
):
response
=
self
.
client
.
get
(
'/test_admin/admin/logout/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assert
Equal
(
response
.
template_nam
e
,
'registration/logged_out.html'
)
self
.
assert
TemplateUsed
(
respons
e
,
'registration/logged_out.html'
)
self
.
assertEqual
(
response
.
request
[
'PATH_INFO'
],
'/test_admin/admin/logout/'
)
# we are now logged out
...
...
@@ -3992,7 +3992,7 @@ class AdminViewLogoutTest(TestCase):
# follow the redirect and test results.
response
=
self
.
client
.
get
(
'/test_admin/admin/logout/'
,
follow
=
True
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assert
Equal
(
response
.
template_nam
e
,
'admin/login.html'
)
self
.
assert
TemplateUsed
(
respons
e
,
'admin/login.html'
)
self
.
assertEqual
(
response
.
request
[
'PATH_INFO'
],
'/test_admin/admin/'
)
self
.
assertContains
(
response
,
'<input type="hidden" name="next" value="/test_admin/admin/" />'
)
...
...
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