summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2013-12-28 10:55:49 -0500
committerEli Collins <elic@assurancetechnologies.com>2013-12-28 10:55:49 -0500
commit6b80772c50ef1d7656cbb34f971648ddd0c4f749 (patch)
treedd84a357735538be5bcaeae4f7abf6b9e42c8068
parent97216e14e96d5e8414946be29fe5f50673124d65 (diff)
downloadpasslib-6b80772c50ef1d7656cbb34f971648ddd0c4f749.tar.gz
test_ext_django: fix spurious error if django 1.6 installed but not bcrypt; added tox case to catch it also
-rw-r--r--passlib/tests/test_ext_django.py4
-rw-r--r--tox.ini9
2 files changed, 11 insertions, 2 deletions
diff --git a/passlib/tests/test_ext_django.py b/passlib/tests/test_ext_django.py
index 9e04158..2862ab9 100644
--- a/passlib/tests/test_ext_django.py
+++ b/passlib/tests/test_ext_django.py
@@ -592,7 +592,9 @@ class DjangoBehaviorTest(_ExtensionTest):
if testcase.is_disabled_handler:
continue
if not has_active_backend(handler):
- assert scheme == "django_bcrypt"
+ # TODO: move this above get_handler_case(),
+ # and omit MissingBackendError check.
+ assert scheme in ["django_bcrypt", "django_bcrypt_sha256"], "%r scheme should always have active backend" % scheme
continue
try:
secret, hash = sample_hashes[scheme]
diff --git a/tox.ini b/tox.ini
index 81652e6..e52df3b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -46,7 +46,7 @@
#===========================================================================
[tox]
minversion=1.4
-envlist = py27,py33,py26,py31,py32,pypy,pypy3,py-bcrypt,py-bcrypt-py3,django12,django13,django14,django15,django,django-py3,gae27
+envlist = py27,py33,py26,py31,py32,pypy,pypy3,py-bcrypt,py-bcrypt-py3,django12,django13,django14,django15,django,django-wo-bcrypt,django-py3,gae27
#===========================================================================
# stock CPython VMs
@@ -158,6 +158,13 @@ deps =
commands =
nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}
+[testenv:django-wo-bcrypt]
+deps =
+ django
+ {[testenv]deps}
+commands =
+ nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}
+
[testenv:django-py3]
# NOTE: including bcrypt so django bcrypt hasher is included
basepython = python3