summaryrefslogtreecommitdiff
path: root/passlib/tests/utils.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2013-12-22 15:25:02 -0500
committerEli Collins <elic@assurancetechnologies.com>2013-12-22 15:25:02 -0500
commitbffea42e623aa7229311f9b59144f600a8093815 (patch)
tree5d1f92c84cb84e5390f24282271255862f159f4d /passlib/tests/utils.py
parentd48644569397bfe529bc05a68ecd21d031550fa6 (diff)
downloadpasslib-bffea42e623aa7229311f9b59144f600a8093815.tar.gz
django compatibility part 2
* added implementation of django 1.6's bcrypt_sha256 hasher, and UTs * added django16 premade context to passlib.apps, made it default django_context * test_ext_django now makes use of django16_context * passlib.ext.django.utils.get_preset_config() now uses django16_context * tox 'django' and 'django-py3' now test bcrypt integration
Diffstat (limited to 'passlib/tests/utils.py')
-rw-r--r--passlib/tests/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py
index 2965689..f4dc811 100644
--- a/passlib/tests/utils.py
+++ b/passlib/tests/utils.py
@@ -1152,9 +1152,10 @@ class HandlerCase(TestCase):
c3 = self.do_genconfig(salt=s1[:-1])
self.assertNotEqual(c3, c1)
+ # XXX: make this a class-level flag
def prepare_salt(self, salt):
"prepare generated salt"
- if self.handler.name in ["bcrypt", "django_bcrypt"]:
+ if self.handler.name in ["bcrypt", "django_bcrypt", "django_bcrypt_sha256"]:
from passlib.utils import bcrypt64
salt = bcrypt64.repair_unused(salt)
return salt