summaryrefslogtreecommitdiff
path: root/passlib/tests
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-04-17 23:56:25 -0400
committerEli Collins <elic@assurancetechnologies.com>2012-04-17 23:56:25 -0400
commitad26f06953bb0db74a79e3bcc1f69f8b0efad521 (patch)
tree3ebff8b013ae5af76eea1d61e1b1877df44f516a /passlib/tests
parentcd029846fdc0c3d7ffc7f53caad4579e7e0e8725 (diff)
downloadpasslib-ad26f06953bb0db74a79e3bcc1f69f8b0efad521.tar.gz
setup warning filters early in TestCase to work around HandlerCase warning issue w/ os_crypt proxying builtin bcrypt
Diffstat (limited to 'passlib/tests')
-rw-r--r--passlib/tests/test_handlers.py7
-rw-r--r--passlib/tests/utils.py3
2 files changed, 6 insertions, 4 deletions
diff --git a/passlib/tests/test_handlers.py b/passlib/tests/test_handlers.py
index 61cdc8f..503b349 100644
--- a/passlib/tests/test_handlers.py
+++ b/passlib/tests/test_handlers.py
@@ -177,10 +177,9 @@ class _bcrypt_test(HandlerCase):
#===============================================================
# override some methods
#===============================================================
- def setUp(self):
- super(_bcrypt_test, self).setUp()
- if self.backend == "builtin":
- warnings.filterwarnings("ignore",
+ def setUpWarnings(self):
+ super(_bcrypt_test, self).setUpWarnings()
+ warnings.filterwarnings("ignore",
"SECURITY WARNING: .*pure-python bcrypt.*")
def do_genconfig(self, **kwds):
diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py
index 5cbb427..aec23e8 100644
--- a/passlib/tests/utils.py
+++ b/passlib/tests/utils.py
@@ -210,6 +210,9 @@ class TestCase(unittest.TestCase):
def setUp(self):
super(TestCase, self).setUp()
+ self.setUpWarnings()
+
+ def setUpWarnings(self):
if self.resetWarningState:
ctx = reset_warnings()
ctx.__enter__()