summaryrefslogtreecommitdiff
path: root/passlib/tests
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-12-06 13:09:39 -0500
committerEli Collins <elic@assurancetechnologies.com>2011-12-06 13:09:39 -0500
commit281c507652e0bcb230101151bf5a09499fb7045d (patch)
treed230165632d510db439ac8ee490ba9ed841e20ae /passlib/tests
parent9a4996c38e1980ac290eceae8ee608ce67b5db0c (diff)
downloadpasslib-281c507652e0bcb230101151bf5a09499fb7045d.tar.gz
added compat.sb_types for testing isinstance(obj,(bytes,unicode))
Diffstat (limited to 'passlib/tests')
-rw-r--r--passlib/tests/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py
index ff6dea8..06aea3c 100644
--- a/passlib/tests/utils.py
+++ b/passlib/tests/utils.py
@@ -37,7 +37,7 @@ from passlib import registry, utils
from passlib.utils import classproperty, handlers as uh, \
has_rounds_info, has_salt_info, MissingBackendError, \
rounds_cost_values, b, bytes, native_str, NoneType
-from passlib.utils.compat import iteritems, irange, callable
+from passlib.utils.compat import iteritems, irange, callable, sb_types
#local
__all__ = [
#util funcs
@@ -298,7 +298,7 @@ class TestCase(unittest.TestCase):
#added in 2.7/UT2 and 3.1
def assertRegexpMatches(self, text, expected_regex, msg=None):
"""Fail the test unless the text matches the regular expression."""
- if isinstance(expected_regex, basestring):
+ if isinstance(expected_regex, sb_types):
assert expected_regex, "expected_regex must not be empty."
expected_regex = re.compile(expected_regex)
if not expected_regex.search(text):