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
beb652e0
Kaydet (Commit)
beb652e0
authored
Haz 15, 2013
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Worked around Python 3.3 modified exception repr
Refs #20599.
üst
990f8d92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
test_hashers.py
django/contrib/auth/tests/test_hashers.py
+4
-3
No files found.
django/contrib/auth/tests/test_hashers.py
Dosyayı görüntüle @
beb652e0
...
...
@@ -5,6 +5,7 @@ from django.conf.global_settings import PASSWORD_HASHERS as default_hashers
from
django.contrib.auth.hashers
import
(
is_password_usable
,
BasePasswordHasher
,
check_password
,
make_password
,
PBKDF2PasswordHasher
,
load_hashers
,
PBKDF2SHA1PasswordHasher
,
get_hasher
,
identify_hasher
,
UNUSABLE_PASSWORD
)
from
django.utils
import
six
from
django.utils
import
unittest
from
django.utils.unittest
import
skipUnless
...
...
@@ -187,7 +188,7 @@ class TestUtilsHashPass(unittest.TestCase):
def
test_load_library_importerror
(
self
):
PlainHasher
=
type
(
str
(
'PlainHasher'
),
(
BasePasswordHasher
,),
{
'algorithm'
:
'plain'
,
'library'
:
'plain'
})
with
self
.
assertRaises
(
ValueError
)
as
e
:
# Python 3.3 adds quotes around module name
with
six
.
assertRaisesRegex
(
self
,
ValueError
,
"Couldn't load 'PlainHasher' algorithm library: No module named '?plain'?"
):
PlainHasher
()
.
_load_library
()
self
.
assertEqual
(
"Couldn't load 'PlainHasher' algorithm library: "
"No module named plain"
,
str
(
e
.
exception
))
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