diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2012-03-11 18:37:49 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2012-03-11 18:37:49 -0400 |
commit | 09b88be2e515ebeddaf64a0f15309b6a3f04416f (patch) | |
tree | 9868ccb551c5dfd6e36d95e1b90c70ca440d6b14 /passlib/tests/test_ext_django.py | |
parent | 29468d26fa3c68a56bd739d4dd9be50d8dd6725c (diff) | |
download | passlib-09b88be2e515ebeddaf64a0f15309b6a3f04416f.tar.gz |
added hack to clear warnings registry so assertWarningList() tests will pass reliably
Diffstat (limited to 'passlib/tests/test_ext_django.py')
-rw-r--r-- | passlib/tests/test_ext_django.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/passlib/tests/test_ext_django.py b/passlib/tests/test_ext_django.py index 05db8a0..4627d30 100644 --- a/passlib/tests/test_ext_django.py +++ b/passlib/tests/test_ext_django.py @@ -13,7 +13,7 @@ from passlib.context import CryptContext, CryptPolicy from passlib.apps import django_context from passlib.ext.django import utils from passlib.hash import sha256_crypt -from passlib.tests.utils import TestCase, unittest, ut_version, catch_warnings +from passlib.tests.utils import TestCase, unittest, ut_version, catch_all_warnings import passlib.tests.test_handlers as th from passlib.utils.compat import iteritems, get_method_function, unicode from passlib.registry import get_crypt_handler @@ -223,9 +223,7 @@ class PatchTest(TestCase): def dummy(): pass - with catch_warnings(record=True) as wlog: - warnings.simplefilter("always") - + with catch_all_warnings(record=True) as wlog: #patch to use stock django context utils.set_django_password_context(django_context) self.assert_patched(context=django_context) |