AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.218.39.173
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/passlib/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyc
�
j^�Xc@`s�dZddlmZmZmZddlZeje�Zddl	m
Z
ddlmZm
Z
mZddlmZmZddlmZmZmZer�dd	lmZnd
gZdZdZedd�r�d
Zn`er,ddlZddlZejjd�Zerej j!e�s<e"de��ne#d�ddgD��ske"de��nej$de�ej j%ed�Z&ej j'de&�zJyddl(m)ZWn/e*k
r�Z+e
e"dee+f���nXWdej j,e&�XqAdZed�rAej-j.d�qAner;dZndZer�ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl	m5Z5d
ej6efd ��YZ7nd
efd!��YZ7dS("s5
test passlib.ext.django against django source tests
i(tabsolute_importtdivisiontprint_functionN(tsuppress_cause(tDJANGO_VERSIONtDjangoTranslatort_PasslibHasherWrapper(tTestCaset	TEST_MODEi(thas_min_djangotstock_configt_ExtensionSupport(tsettingstHashersTesttmaxtquicksrequires >= 'default' test modet PASSLIB_TESTS_DJANGO_SOURCE_PATHs django source path not found: %rcc`s0|]&}tjjtjjt|��VqdS(N(tostpathtexiststjointsource_path(t.0tname((sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pys	<genexpr>6stdjangottestssinvalid django source path: %rs'using django tests from source path: %r(ttest_hasherss=error trying to import django tests from source path (%r): %rs3requires PASSLIB_TESTS_DJANGO_SOURCE_PATH to be settfullst
WARNING: $PASSLIB_TESTS_DJANGO_SOURCE_PATH is not set; can't run Django's own unittests against passlib.ext.django
sdjango version too oldsdjango not installed(tsetting_changed(treceiver(t
import_string(tget_unbound_method_functioncB`sPeZdZeej�Zd�Zd�Zd�ZeZ	eZ
eZeZRS(sq
        Run django's hasher unittests against passlib's extension
        and workalike implementations
        c`st|jdtdt�ddlm��j�ddlm}x9dddd	d
gD]"}|jt	|t
||��qUWddlm}|j|dt�t
�j�ttd
t����fd��}|jtj|�|���fd��tg���fd�}x<dddddddgD]}|j�||dt�q4W|j�d|dt�dS(NtPASSLIB_CONTEXTtchecki(tadapter(thasherst
make_passwordtcheck_passwordtidentify_hashertis_password_usablet
get_hasher(tdjango_des_crypttuse_duplicate_salttweakc`s�|r|ddkrdS��jks/t�gtjD]}�t|���^q9}d|kr�d|kr�|jd�n|jd��jd|dd��j�dS(	NtsettingtPASSWORD_HASHERSthex_md5tdjango_salted_md5tdjango_disabledtschemest
deprecatedtauto(tcontexttAssertionErrorRR-Rtappendtupdatet
reset_hashers(tkwdst	hash_pathR1(R"R4tdjango_to_passlib_name(sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pytupdate_schemes�s(
c`s�x��jdt�D]�}d|jkr.qn�j|�}t|t�rRqnt|dd�pst|dd�}|dkr�qn||_|_	|_
qWdS(sN
                sync django hasher config -> passlib hashers
                tresolvetroundst
iterationsN(R1tTruetsetting_kwdstpasslib_to_djangot
isinstanceRtgetattrtNonetmin_desired_roundstmax_desired_roundstdefault_rounds(thandlerthasherR>(R"R4(sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyt
update_rounds�sc`s=�ds0t�d<z��Wdt�d<Xn|||�S(sY
                wrapper around arbitrary func, that first triggers sync
                iN(R@tFalse(twrappedtargsR9(t
_in_updateRK(sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pytupdate_wrapper�s

R1RItdefault_schemethashtverifytneeds_updatetverify_and_updatetwraptdjango_to_passlib(tload_extensionR
RLtpasslib.ext.django.modelsR"R4tdjango.contrib.authR#t	patchAttrttest_hashers_modRDtpasslib.hashR)RR;RRt
addCleanupt
disconnectR@(tselfR#tattrR)R<RP((ROR"R4R;RKsH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pytsetUpns.	
 '	
cC`s!|j�tt|�j�dS(N(tunload_extensiontsuperR
ttearDown(R`((sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyRe�s
cC`s
|jd�S(Nsomitted by passlib(tskipTest(R`((sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyt<lambda>�s(
t__name__t
__module__t__doc__RRR[RbRet_OMITttest_pbkdf2_upgrade_new_hashert(test_check_password_calls_harden_runtimettest_bcrypt_harden_runtimettest_pbkdf2_harden_runtime(((sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyR
^s	f	
	cB`seZd�ZRS(cC`s|jt��dS(sexternal django hasher testsN(Rfthashers_skip_msg(R`((sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyt!test_external_django_hasher_tests�s(RhRiRq(((sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyR
�s(8Rjt
__future__RRRtloggingt	getLoggerRhtlogtpasslib.utils.compatRtpasslib.ext.django.utilsRRRtpasslib.tests.utilsRRttest_ext_djangoR	R
RRt__all__RER\RpRtsystenvirontgetRRRtEnvironmentErrortalltinfoRt
tests_pathtinsertt
auth_testsRtImportErrorterrtremovetstderrtwritetdjango.core.signalsRtdjango.dispatchRtdjango.utils.module_loadingRRtTestUtilsHashPassR
(((sH/usr/lib/python2.7/site-packages/passlib/tests/test_ext_django_source.pyt<module>s`				�

Anon7 - 2022
AnonSec Team