mirror of
https://github.com/django/django.git
synced 2025-08-02 18:13:02 +00:00
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
This commit is contained in:
parent
f909fa84be
commit
b5f0b3478d
27 changed files with 84 additions and 104 deletions
|
@ -12,7 +12,6 @@ from django.contrib.auth.hashers import (
|
|||
)
|
||||
from django.test import SimpleTestCase, mock
|
||||
from django.test.utils import override_settings
|
||||
from django.utils import six
|
||||
from django.utils.encoding import force_bytes
|
||||
|
||||
try:
|
||||
|
@ -436,7 +435,7 @@ class TestUtilsHashPass(SimpleTestCase):
|
|||
PlainHasher = type(str('PlainHasher'), (BasePasswordHasher,), {'algorithm': 'plain', 'library': 'plain'})
|
||||
# Python 3 adds quotes around module name
|
||||
msg = "Couldn't load 'PlainHasher' algorithm library: No module named '?plain'?"
|
||||
with six.assertRaisesRegex(self, ValueError, msg):
|
||||
with self.assertRaisesRegex(ValueError, msg):
|
||||
PlainHasher()._load_library()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue