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
e75bd7e5
Kaydet (Commit)
e75bd7e5
authored
Nis 29, 2012
tarafından
Alex Gaynor
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #22 from aviraldg/test_17967
Added regression test for #17967. Thanks to aviraldg for the patch!
üst
a15cfb2e
0525f6d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests.py
tests/regressiontests/admin_views/tests.py
+15
-0
No files found.
tests/regressiontests/admin_views/tests.py
Dosyayı görüntüle @
e75bd7e5
...
...
@@ -572,6 +572,21 @@ class AdminViewBasicTest(TestCase):
except
SuspiciousOperation
:
self
.
fail
(
"Filters should be allowed if they are defined on a ForeignKey pointing to this model"
)
def
test_hide_change_password
(
self
):
"""
Tests if the "change password" link in the admin is hidden if the User
does not have a usable password set.
(against 9bea85795705d015cdadc82c68b99196a8554f5c)
"""
user
=
User
.
objects
.
get
(
username
=
'super'
)
password
=
user
.
password
user
.
set_unusable_password
()
user
.
save
()
response
=
self
.
client
.
get
(
'/test_admin/admin/'
)
self
.
assertFalse
(
reverse
(
'admin:password_change'
)
in
response
.
content
,
msg
=
'The "change password" link should not be displayed if a user does not have a usable password.'
)
class
AdminViewFormUrlTest
(
TestCase
):
urls
=
"regressiontests.admin_views.urls"
...
...
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