File: _test_bad_register.py

package info (click to toggle)
python-passlib 1.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,184 kB
  • sloc: python: 26,132; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""helper for method in test_registry.py"""

import passlib.utils.handlers as uh
from passlib.registry import register_crypt_handler


class dummy_bad(uh.StaticHandler):
    name = "dummy_bad"


class alt_dummy_bad(uh.StaticHandler):
    name = "dummy_bad"


# NOTE: if tests is being run from symlink (e.g. via gaeunit),
#       this module may be imported a second time as test._test_bad_registry.
#       we don't want it to do anything in that case.
if __name__.startswith("tests"):
    register_crypt_handler(alt_dummy_bad)