From 4af9748bcaed1085a8c1e64c2370fa00fb244f11 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Fri, 20 Dec 2013 22:11:07 -0500 Subject: django compatibility updates (should fix issue 50) passlib.ext.django & it's tests have gotten out of sync with django, leading to a number of UT failures, as reported in issue 50. tests now pass on django 1.2 through 1.6 passlib.ext.django ------------------ mimic changes in django's hasher logic: * handle unsalted_sha1 hasher (django 1.4.6+) * check_password(): empty hashes return False, rather throw error (django 1.5+ * allow empty passwords (django 1.6+) * generate unusuable password suffixes (django 1.6+) passlib.hash ------------ * django_des_crypt: added "use_duplicate_salt" class attr, allowing tests to enable django 1.4+ style hashes which omit 1st salt. * django_disabled: added support for django 1.6+ random suffixes passlib.tests ------------- * test_ext_django: lots of changes to verify django 1.5/1.6 behavior * test_handlers_django: split django tests out of test_handlers to make it easiers to run django-related tests. * added workaround for encoding glitch in salted_md5 / salted_sha1 hashers (django 1.5+) --- tox.ini | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 69 insertions(+), 18 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index 016e41b..c89f5ac 100644 --- a/tox.ini +++ b/tox.ini @@ -23,9 +23,8 @@ # testing of m2crypto integration - done in py27 test # # testing of django integration - split across various cpython tests: -# py25 - tests django 1.3 -# py26 - tests no django -# py27 - tests latest django +# py27,py33 - tests latest django +# djangoXX - tests specific django versions # # testing of bcrypt backends - split across various cpython tests: # py25 - tests builtin bcrypt @@ -36,8 +35,8 @@ # global config #=========================================================================== [tox] -minversion=1.3 -envlist = py27,py32,py25,py26,py31,py33,pypy1.5,pypy16,pypy17,pypy18,pypy19,jython,gae25,gae27 +minversion=1.4 +envlist = py27,py33,py25,py26,py31,py32,pypy,pypy3,django12,django13,django14,django15,jython,gae25,gae27 #=========================================================================== # stock CPython VMs @@ -54,13 +53,14 @@ deps = unittest2 [testenv:py25] +# NOTE: unittest2 omitted, to test unittest backport code deps = nose coverage - # unittest2 omitted, to test backport code - django<1.4 [testenv:py27] +# NOTE: M2Crypto requires swig & libssl-dev, +# a number of packages required C compiler & python-dev deps = nose coverage @@ -82,28 +82,75 @@ deps = unittest2py3k [testenv:py33] +# TODO: test bcrypt library w/ py3 compatibility deps = nose coverage unittest2py3k + django #=========================================================================== -# PyPy VM - all releases currently target Python 2.7 +# django integration testing #=========================================================================== -[testenv:pypy15] -basepython = pypy1.5 +[testenv:django12] +deps = + nose + unittest2 + django<1.3 +commands = + nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} -[testenv:pypy16] -basepython = pypy1.6 +[testenv:django13] +deps = + nose + unittest2 + django<1.4 +commands = + nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} -[testenv:pypy17] -basepython = pypy1.7 +[testenv:django14] +deps = + nose + unittest2 + django<1.5 +commands = + nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} -[testenv:pypy18] -basepython = pypy1.8 +[testenv:django15] +deps = + nose + unittest2 + django<1.6 +commands = + nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} + +[testenv:django] +deps = + nose + unittest2 + django +commands = + nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} + +[testenv:django-py3] +basepython = python3 +deps = + nose + unittest2py3k + django +commands = + nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} -[testenv:pypy19] -basepython = pypy1.9 +#=========================================================================== +# PyPy VM - all releases currently target Python 2.7 +#=========================================================================== +[testenv:pypy] +# pypy (as of v1.6 - v2.2) targets Python 2.7 +basepython = pypy + +[testenv:pypy3] +# pypy3 (as of v2.1b1) targets Python 3.2 +basepython = pypy3 #=========================================================================== # Jython - no special directives, currently same as py25 @@ -112,7 +159,11 @@ basepython = pypy1.9 #=========================================================================== # Google App Engine integration #=========================================================================== + [testenv:gae25] +# NOTE: google is deprecating py25 support, per +# https://developers.google.com/appengine/docs/python/python25/diff27 +# and so this test can probably be removed sometime after 2014-01-01 basepython = python2.5 deps = # FIXME: getting all kinds of errors when using nosegae 0.2.0 :( -- cgit v1.2.1