diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 15:08:56 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2020-10-06 15:08:56 -0400 |
commit | 3709566d41523e5bc31e1063b647e90f1469744a (patch) | |
tree | e29eed3fa76fad9373432cda397ff7dc9cb24e4e /passlib/tests/test_utils.py | |
parent | 56017e683f8e31be252c94f23d4dd22a2d5603f9 (diff) | |
download | passlib-3709566d41523e5bc31e1063b647e90f1469744a.tar.gz |
cleanup old python compat -- replaced "unicode" alias in favor of "str"
Diffstat (limited to 'passlib/tests/test_utils.py')
-rw-r--r-- | passlib/tests/test_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/passlib/tests/test_utils.py b/passlib/tests/test_utils.py index e954422..ceea26a 100644 --- a/passlib/tests/test_utils.py +++ b/passlib/tests/test_utils.py @@ -9,7 +9,7 @@ import warnings # pkg # module from passlib.utils import is_ascii_safe, to_bytes -from passlib.utils.compat import unicode, join_bytes, PYPY +from passlib.utils.compat import join_bytes, PYPY from passlib.tests.utils import TestCase, hb, run_with_fixed_seeds #============================================================================= @@ -121,7 +121,7 @@ class MiscTest(TestCase): # letters x = wrapper(u'abc', 32) y = wrapper(u'abc', 32) - self.assertIsInstance(x, unicode) + self.assertIsInstance(x, str) self.assertNotEqual(x,y) self.assertEqual(sorted(set(x)), [u'a',u'b',u'c']) @@ -195,18 +195,18 @@ class MiscTest(TestCase): # helpers to generate hashes & config strings to work with def get_hash(secret): - assert isinstance(secret, unicode) + assert isinstance(secret, str) hash = hasher.hash(secret) if isinstance(hash, bytes): # py2 hash = hash.decode("utf-8") - assert isinstance(hash, unicode) + assert isinstance(hash, str) return hash # test ascii password & return type s1 = u"test" h1 = get_hash(s1) result = safe_crypt(s1, h1) - self.assertIsInstance(result, unicode) + self.assertIsInstance(result, str) self.assertEqual(result, h1) self.assertEqual(safe_crypt(to_bytes(s1), to_bytes(h1)), h1) |