__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
"""backports of needed unittest2 features"""
#=============================================================================
# imports
#=============================================================================
from __future__ import with_statement
# core
import logging; log = logging.getLogger(__name__)
import re
import sys
##from warnings import warn
# site
# pkg
from passlib.utils.compat import PY26
# local
__all__ = [
"TestCase",
"unittest",
# TODO: deprecate these exports in favor of "unittest.XXX"
"skip", "skipIf", "skipUnless",
]
#=============================================================================
# import latest unittest module available
#=============================================================================
try:
import unittest2 as unittest
except ImportError:
if PY26:
raise ImportError("Passlib's tests require 'unittest2' under Python 2.6 (as of Passlib 1.7)")
# python 2.7 and python 3.2 both have unittest2 features (at least, the ones we use)
import unittest
#=============================================================================
# unittest aliases
#=============================================================================
skip = unittest.skip
skipIf = unittest.skipIf
skipUnless = unittest.skipUnless
SkipTest = unittest.SkipTest
#=============================================================================
# custom test harness
#=============================================================================
class TestCase(unittest.TestCase):
"""backports a number of unittest2 features in TestCase"""
#===================================================================
# backport some unittest2 names
#===================================================================
#---------------------------------------------------------------
# backport assertRegex() alias from 3.2 to 2.7
# was present in 2.7 under an alternate name
#---------------------------------------------------------------
if not hasattr(unittest.TestCase, "assertRegex"):
assertRegex = unittest.TestCase.assertRegexpMatches
if not hasattr(unittest.TestCase, "assertRaisesRegex"):
assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
#===================================================================
# eoc
#===================================================================
#=============================================================================
# eof
#=============================================================================
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 20 B | 0644 |
|
| __main__.py | File | 82 B | 0644 |
|
| _test_bad_register.py | File | 541 B | 0644 |
|
| backports.py | File | 2.53 KB | 0644 |
|
| sample1.cfg | File | 243 B | 0644 |
|
| sample1b.cfg | File | 252 B | 0644 |
|
| sample1c.cfg | File | 490 B | 0644 |
|
| sample_config_1s.cfg | File | 238 B | 0644 |
|
| test_apache.py | File | 28.75 KB | 0644 |
|
| test_apps.py | File | 5.16 KB | 0644 |
|
| test_context.py | File | 72.8 KB | 0644 |
|
| test_context_deprecated.py | File | 28.6 KB | 0644 |
|
| test_crypto_builtin_md4.py | File | 5.53 KB | 0644 |
|
| test_crypto_des.py | File | 8.67 KB | 0644 |
|
| test_crypto_digest.py | File | 20 KB | 0644 |
|
| test_crypto_scrypt.py | File | 26.02 KB | 0644 |
|
| test_ext_django.py | File | 40.4 KB | 0644 |
|
| test_ext_django_source.py | File | 10.78 KB | 0644 |
|
| test_handlers.py | File | 67.02 KB | 0644 |
|
| test_handlers_argon2.py | File | 22.3 KB | 0644 |
|
| test_handlers_bcrypt.py | File | 28.86 KB | 0644 |
|
| test_handlers_cisco.py | File | 19.99 KB | 0644 |
|
| test_handlers_django.py | File | 15.17 KB | 0644 |
|
| test_handlers_pbkdf2.py | File | 18.35 KB | 0644 |
|
| test_handlers_scrypt.py | File | 4.09 KB | 0644 |
|
| test_hosts.py | File | 3.81 KB | 0644 |
|
| test_pwd.py | File | 7.02 KB | 0644 |
|
| test_registry.py | File | 9.03 KB | 0644 |
|
| test_totp.py | File | 64.25 KB | 0644 |
|
| test_utils.py | File | 45.04 KB | 0644 |
|
| test_utils_handlers.py | File | 31.38 KB | 0644 |
|
| test_utils_md4.py | File | 1.44 KB | 0644 |
|
| test_utils_pbkdf2.py | File | 11.91 KB | 0644 |
|
| test_win32.py | File | 1.88 KB | 0644 |
|
| tox_support.py | File | 2.42 KB | 0644 |
|
| utils.py | File | 144.17 KB | 0644 |
|