summaryrefslogtreecommitdiff
path: root/passlib/tests/test_apache.py
Commit message (Collapse)AuthorAgeFilesLines
* updated passlib.apache module's api - more flexible to use, changed some ↵Eli Collins2012-04-171-129/+218
| | | | ambiguous method names
* updated test support & py3 compat code from an external libraryEli Collins2012-03-121-2/+2
| | | | | | | | | | | | | | | | passlib.tests ------------- * deprecated support for unittest 1... accumulated too many backports, planning to require unittest2 in next release. * case_prefix renamed to shortDescription * test case now archives & clears warning registry state in addition to warning filter state passlib.utils.compat -------------------- * a bunch of the bytes-related functions were renamed for clarity * NativeStringIO alias added * trange alias merged into irange
* changed test_utils to import subjects within test functions, instead of globallyEli Collins2012-01-181-2/+1
|
* deprecated to_hash_str, replaced all instances with to_native_strEli Collins2011-12-281-4/+4
| | | | | | decided that to_hash_str will always return native string, feature of hashes being returned as unicode under python 2 is better done through a CryptContext option.
* ran a custom 2to3 fixer to replace all u"" with u() and add an import from ↵Eli Collins2011-12-061-7/+8
| | | | compat.u
* added compat.unicode imports in a number of placesEli Collins2011-12-061-1/+1
| | | | | | | | this distinguishes the types, so that for isinstance() tests... * 'unicode' always means the unicode type * 'bytes' always means the bytes type * 'str' always means the native string type
* replaced xrange() instances with compat.irange() aliasEli Collins2011-12-061-2/+3
|
* unittest fixesEli Collins2011-08-121-11/+1
| | | | | * backport of ut2's assertAlmostEquals delta kwd * test_context uses set_file so we can always write bytes
* GAE compatibility fix: changed apache UTs to not rely on filesystem.Eli Collins2011-08-121-66/+69
| | | | | | * added private constructor Htpasswd._from_string(), will clean it up and make public in future * most apache tests now use _from_string() so they don't have to write to fs * tests which still require writing to fs (mainly the autoload tests) now skipped for GAE
* replaced assert_, assertEquals, assertNotEquals to silence Py3.2 deprecation ↵Eli Collins2011-07-111-27/+27
| | | | warnings
* stripped trailing whitespace from a bunch of filesEli Collins2011-07-081-6/+6
|
* minor fixesEli Collins2011-06-201-1/+1
|
* added UT for safe_os_crypt(), helper method is_ascii_safe()Eli Collins2011-06-201-3/+0
|
* apache module rewritten for py3 compatEli Collins2011-06-201-27/+104
| | | | | | | | * added 'encoding' kwd to Htpasswd, Htdigest constructors, allowing user/realm encoding to be specified. * treats file as bytes internally * added UTs for encoding-specific behavior * added render_bytes() util helper - py2/3 compatible replacement for using % formatting with bytes
* coverage workEli Collins2011-03-181-0/+11
| | | | | | | | | | | ============= * restored "default" mode for set_backend() * bugfix: HandlerCase now sets backend explicitly, incorrect backend checks were previously happening * added UT for genhash(secret, None) * enabled HandlerCase.supports_unicode for all hashes * added some needed test cases revealed by coverage check * added "pragma: no cover" for a select few branches that don't need testing * all UTs pass, 92% coverage
* bugfixesEli Collins2011-03-171-6/+10
| | | | | | | | | | ======== * bugfix: test_apache now backdates mtime on files instead of time.sleep() - more reliable across OS's * bugfix: bcrypt & md5_crypt used classmethod() on _has_backend_xxx attrs instead of classproperty() * added backendmixin test suite to HandlerCase to detect regression of above backend bug * added test case for CryptContext.replace() * added setUp/cleanUp support to create_backend_case() (fixes ut test bug) * all UTs passed
* passlib.apache: improved interface; added docs & UTs (all passlib.apache uts ↵Eli Collins2011-03-171-0/+314
pass)