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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/lib/python2.7/site-packages/passlib/tests/
Upload File :
Current File : //lib/python2.7/site-packages/passlib/tests/test_context.pyo
�
j^�Xc@�s!dZddlmZddlmZer?ddlmZnddlmZddlZddl	m
Z
ddlZeje
�ZddlZddlZddlmZddlmZmZdd	lmZmZdd
lmZmZddlmZmZmZmZm Z m!Z!ddl"j#j$Z%ddl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,dd
l-m.Z.m/Z0m1Z2m3Z3ej4j5ej4j6e7��Z8d�Z9de'fd��YZ:ddl;Z;ddl<Z<de%j=fd��YZ>de%j=fd��YZ?de'fd��YZ@dS(stests for passlib.contexti����(twith_statement(tPY3(tNoSectionErrorN(tpartial(thash(tCryptContexttLazyCryptContext(tPasslibConfigWarningtPasslibHashWarning(ttickt
to_unicode(tirangetutunicodet
str_to_uasciitPY2tPY26(tTestCasetset_filetTICK_RESOLUTIONt
quicksleept	time_callthandler_derived_from(tregister_crypt_handler_patht_has_crypt_handlert_unload_handler_nametget_crypt_handlercO�sD|j�}x|D]}|j|�qW|r@|j|�n|S(N(tcopytupdate(tfirsttargstkwdsttargettarg((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytmerge_dicts&s
tCryptContextTestcB�s�eZdZddddgZgeD]Zee�^q%Zededdddd	d
ddd
ddd�Ze	ede�Z
ed�Zed�Z
ejjed�Ze
jed�ed��Zejjed�Ze
jed�ed��jd�Zejjed�ZerNeee
�eee�eee�neddd	ddddd�Zd Ze	ee�Zedd�Ze	ee�Zedddd!dd"gd#dgdd"d	d$dd%d&d'd(d)d*d+d,d)d-d.d/d0�Z d1�Z!d2�Z"d3�Z#d4�Z$d5�Z%d6�Z&d7�Z'd8�Z(d9�Z)d:�Z*d;�Z+d<�Z,d=�Z-d>�Z.dZd?�Z0d@�Z1dA�Z2dB�Z3dC�Z4dD�Z5dE�Z6dZifdZiddF6fdGifd[ifgZ7dH�Z8dI�Z9dJ�Z:dK�Z;edL�Z<dM�Z=dN�Z>dO�Z?dP�Z@dQ�ZAdR�ZBdS�ZCdT�ZDdU�ZEdV�ZFdW�ZGdX�ZHdY�ZIRS(\Rt	des_cryptt	md5_cryptt
bsdi_crypttsha512_crypttschemestdefaulttall__vary_roundsg�������?tbsdi_crypt__max_roundsi1utbsdi_crypt__default_roundsi�atsha512_crypt__max_roundsiP�tsha512_crypt__min_roundsi@�s[passlib]
schemes = des_crypt, md5_crypt, bsdi_crypt, sha512_crypt
default = md5_crypt
; this is using %...
all__vary_rounds = 10%%
bsdi_crypt__default_rounds = 25001
bsdi_crypt__max_rounds = 30001
sha512_crypt__max_rounds = 50000
sha512_crypt__min_rounds = 40000
s�[passlib]
schemes = des_crypt, md5_crypt, bsdi_crypt, sha512_crypt
default = md5_crypt
all__vary_rounds = 0.1
bsdi_crypt__default_rounds = 25001
bsdi_crypt__max_rounds = 30001
sha512_crypt__max_rounds = 50000
sha512_crypt__min_rounds = 40000

ssample1.cfgs
s
ssample1b.cfgs	[passlib]s
[mypolicy]sutf-16ssample1c.cfgtbsdi_crypt__min_roundsiIqi��iyiȯs�[passlib]
bsdi_crypt__min_rounds = 29001
bsdi_crypt__max_rounds = 35001
bsdi_crypt__default_rounds = 31001
sha512_crypt__min_rounds = 45000
tphpasstsha256_cryptt
deprecatediitbsdi_crypt__vary_roundsitsha256_crypt__max_roundsi�tsha256_crypt__min_roundsi�tsha256_crypt__default_roundst
phpass__identtHtphpass__default_roundsicC�s7tt|�j�tjdd�tjdd�dS(Ntignores The 'all' scheme is deprecated.*s4.*'scheme' keyword is deprecated as of Passlib 1.7.*(tsuperR#tsetUptwarningstfilterwarnings(tself((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR<�scC�s�t�}|j|j�i�t|j�}|j|j�|j�t|j�}|j|j�|j�t|j�}|j|j�|j�t|j�}|j|j�|j�tdtd�g�}|j|j�d�dS(stest class constructorR(R1N(ssha256_crypt(	RtassertEqualtto_dictt
sample_1_dicttsample_1_resolved_dictt
sample_2_dictt
sample_3_dictRR((R?tctx((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_01_constructor�s	cC�s%tj|j�}|j|j�|j�tj|j�}|j|j�|j�tj|jjd��}|j|j�|j�tj|j�}|j|j�|j�tj|j	dddd�}|j|j�|j�|j
ttjd�|j
t
tj|jdd�dS(stest from_string() constructorsutf-8tsectiontmypolicytencodingsutf-16tfakesectionN(Rtfrom_stringtsample_1_unicodeR@RARBtsample_1_unnormalizedtencodetsample_1b_unicodetsample_1c_bytestassertRaisest	TypeErrortNoneR(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_02_from_string�s	cC�stjj|j�s+td|j��ntj|j�}|j|j�|j	�tj|j
�}|j|j�|j	�tj|jdddd�}|j|j�|j	�|jt
tjtjjtd��|jttj|jdd�dS(	stest from_path() constructorscan't find data file: %rRHRIRJsutf-16ssample1xxx.cfgRKN(tostpathtexistst
sample_1_pathtRuntimeErrorRt	from_pathR@RARBtsample_1b_pathtsample_1c_pathRRtEnvironmentErrortjointhereR(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_03_from_path�s	cC�sVt|j�}|j|j�}|j|j�|j�|j|j�|j�|j|j�}|j|j�|j�|j|j�|j�|j|j�}|j|j�|j�|j�}|j	||�|j|j�|j�|j|j�|j�|j
|j�|j|j�|j�|j|j�|j�dS(stest copy() methodN(RRBRRDR@RAtsample_12_dictREtsample_123_dicttassertIsNotR(R?tcc1tcc2tcc2btcc3tcc4((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_04_copys cC�s)t|j�}|jt|�d�dS(stest repr()s!^<CryptContext at 0x-?[0-9a-f]+>$N(RRBtassertRegextrepr(R?Re((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_09_repr+scC�s$t�}|j|j�|j|j�|j�|j|j�|j|j�|j�|j|jjd��|j|j�|j�|jt|jd�t|j�}|jidt
�|j|j�|j�t�}|j|j�|j|j�|j|j�|j�dS(s test load() / load_path() methodsutf-8RN(RtloadRBR@RARMRORRRSRTtTrueRD(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_10_load4s	
	cC�s�tddgdddd�}|j�}|jt|jdt�|j|j�|�|jt|jdt�|j|j�|�|jt|jd	d
�|j|j�|�dS(s$test load() errors restore old stateR$R1R6i�R*g�������?ttoo__many__key__partstfake_context_optionR5i'N(	Rt	to_stringRRRSRRoR@tKeyErrort
ValueError(R?tcctresult((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_11_load_rollback_s	cC�sUt|j�}|j�|j|j�|j�t|j�}|j|j�|j|j�|j�|j|j�|j|j�|j�t|j�}|j|j�|j|j�|j�t|j�}|j|j	�|j|j�|j�|j
t|jii�|j
t|jiddg�|j
t|jd�dS(stest update() methodR(R$N(
RRBRR@RARDRbRERctsample_2_unicodeRRRSRT(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_12_updatews"
cC�s�d�}|jttdd�|jttdd�|jttdd�|jttdd�|jttdd�|jttd	d
�|jt|idd6�tid
d6dd6�}|j|jd�d�tdd�}|j|dd�|�|j|dd�|�|j|dd�|�|j|idd6�|�|j|idd6�|�tdd�}|j|dd�|�|j|idd6�|�tdd�}|j|dd�|�|j|dd�|�|j|idd6�|�|j|idd6�|�tdd�}|j|dd�|�|j|idd6�|�tddgd d!�}|jt|jd"d!�|jttddgd#d$�|jttddgd%d$�d&S('stest basic option parsingc[�st|�j�S(N(RRA(R((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytparse�st__g�������?tdefault__scheme__txt__optiontdefault____optiont__scheme__optiont!category__scheme__option__invalidi0uR%sadmin.context__schemessmd5_crypt,des_cryptR(R$sadmin.context__defaulttadminR)tcontext__defaulttdefault__context__defaultscontext.defaultsdefault.context.defaulttadmin__context__defaultsadmin.context.defaultR*tdefault__all__vary_roundssall.vary_roundssdefault.all.vary_roundstadmin__all__vary_roundssadmin.all.vary_roundsR0R7tPtmd5_crypt__identtdes_crypt__salttxxt	all__saltN(RRRSRRtR@tdefault_schemetdictR(R?R{RFRw((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_20_options�sH		

cC�sFtdd
�}|j|j�d�tdddg�}|j|j�d�tdd�}|j|j�d
�tdtjtjg�}|j|j�d�|jttdt	j
g�dt	j
fd��Y}|jttd|g�dt	j
fd��Y}|jttd||g�|jttd	dg�d
S(s%test 'schemes' context option parsingR(R$R%s des_crypt, md5_crypt, tnamelesscB�seZdZRS(N(t__name__t
__module__RTtname(((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR��stdummy_1cB�seZdZRS(R�(R�R�R�(((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR�stadmin__context__schemesN((s	des_crypts	md5_crypt(s	des_crypts	md5_crypt(s	des_crypts	md5_crypt(
RRTR@R(RR$R%RRRStuht
StaticHandlerRuRt(R?RvR�R�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_21_schemes�sc	C�sdd�}tddg�}|jdddg�|j||�dg�tddgdddg�}|j||�dg�|jttdtjgdddg�tddddddg�}|j||�ddg�|jttddgddg�|jt	tddgddg�|jt	tdddgdddg�|jt	tdddgd	ddd�|jt	tdddgd	ddd�|jt	tdddgd
ddd�|jt	tdddgd
ddd�tdddgddd
ddg�|jttdd�tddgdddgddg�}|j||�dg�|j||d�dg�|j||d
�dg�tddgdddgdg�}|j||�dg�|j||d�dg�|j||d
�g�dS(s(test 'deprecated' context option parsingcS�s2g|j�D]!}|j||�jr
|^q
S(N(R(thandlerR2(RFtcategoryR�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytgetdepsR2R%R(R$smd5_crypt,des_cryptR1tadmin__context__deprecatedR)R�i{tuserR�N(
RTRRR@RRRSRR%RtRu(R?R�Rv((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_22_deprecatedsh

	

	cC�s�|jtdd�j�tdd��tdddddg�}|j|j�d�tdtjdddg�}|j|j�d�tdddg�}|j|j�d�|jdd�|j|j�d�|jt	tddgdd�|jt
tdd�tdddddgdd�}|j|j�d�|j|jd�d�|j|jd	�d�d
S(s%test 'default' context option parsingR)R%R(R$R2iR�R�R�N(R@RRAR�R�RR%RRRRtRS(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_23_defaulths&	cC�s{d�}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�dS(s&test 'vary_rounds' hash option parsingcS�std|�j�dS(NR*(RRA(tv((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR{�sg�������?s0.1s10%i�t1000N(R@(R?R{((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_24_vary_rounds�s	cC�s |jt||�d|�dS(Ntmsg(t
assertTrueR(R?R�tbaseR�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytassertHandlerDerivedFrom�scC�st�}|j|j�d�|j|jdt�d�t|j�}|j|j�t|j��|j|jdtdt�t|j��xBt|jdt�|j�D]"\}}|j	t
||��q�Wt|j�}|j|j�d�dS(stest schemes() methodtresolvetunconfiguredN((((RR@R(RoRBttupletsample_1_schemestsample_1_handlerstzipR�RRD(R?RFRwtcorrect((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_30_schemes�s	++cC�s�t�}|jt|j�t|j�}|j|j�d�|j|jdtdt�tj�|j	|jdt�tj�t|j
�}|jt|j�td|j�}|j|j�d�dS(stest default_scheme() methodR%R�R�R(R$N(RRRRtR�RBR@RoRR%R�RDR�(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_31_default_scheme�s	%cC�st�}|jt|j�|jt|jd�t|j�}|j|jdt�tj�|j	|j�tj�|j|jddt�tj
�|j	|jd�tj
�|jt|jd�tddd�}|j|jdt�tj�|j	|j�tj�|j|jdddt�tj�|j	|jdd�tj�|j|jdd	dt�tj�|j	|jdd�tj�tr�|j|jdt
d�dt�tj�|j|jdt
d	�dt�tj�nd
S(stest handler() methodR%R�R$tmysql323ssha256_crypt,md5_cryptR�R�tstaffR�N(RRRRtR�RBR@RoRR%R�R$R1RR(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_32_handler�s&	"%%+cC�s�dd�}tdtddddgdddgdd	d
ddd
dddgdddddd�
}|j|jjd�|j||d�tdtdd	dd
��|j||dd�tdtdd	dd
��|j||dd�tdddd��|j||d�tdtdt��|j||dd�tdtdt��|j||dd�tdtdt��|j||d�tdd��|j||dd�tdd��|j||dd�tdddt��dS(s*test internal _get_record_options() methodcS�s|jj||�dS(Ni(t_configt_get_record_options_with_flag(RFtschemeR�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytoptions�sttruncate_errorR(R'R$R&R2R*g�������?R3g�������?R-i NR�R�g�������?tadmin__bsdi_crypt__vary_roundsg333333�?tadmin__sha512_crypt__max_roundsi@�R�tvary_roundst
max_roundsR�N(sadmin(RTRRoR@R�t
categoriesR�(R?R�Ri((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_33_options�sP	







cC�sKt|j�}|j|j�|j�|j|jdt�|j�dS(stest to_dict() methodR�N(RRBR@RARoRC(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_34_to_dictCscC�s�t|j�}|j�}ts7|j||j�ntj|�}|j|j�|j�|jdd�}|j||jdd��ddl	m
}t|dg�}|j�}|j|d�d	S(
stest to_string() methodRHspassword-securitys	[passlib]s[password-security]i����(tUnsaltedHashR%sM# NOTE: the 'unsalted_test_hash' handler\(s\) are not registered with PasslibN(RRBRsRR@RMRLRAtreplacet!passlib.tests.test_utils_handlersR�Rk(R?RFtdumptctx2totherR�tctx3((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_35_to_stringJsR�icC�s�tjtjtjg}t|dd�}x�|D]�}|jdd|j�}|j|j|�|j�|j|j|dtdt�|�|j	|j|dt�|�|j
|jd|��|j|jd|��q1W|jd�}|j|j|�d�|j
d	|j��}|j|j|�d�|j
d	|j�dd�}|j|j|�d�|jt|j
d	|j�dd
�dS(s-test basic hash/identify/verify functionalityR,ittestR�R�R�tnotestR%tsecretR$N(RR%R$R&RR�R@tidentifyRoR�R�tverifytassertFalsetgenhasht	genconfigRRRu(R?thandlersRvtcryptth((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyt
test_40_basicqs 
%c
C�s�tdddgdddddd	�}|j|j�jd
��|j|jdd�jd��|j|jddd
d�jd��|j|jddd
d�jd��|j|jdddddddd	�d�trN|jdd�}|j|jd
td��jd��|j|jd
td��jd��n|jt	t�j�|jt	t�jdd�|jt	|jdd�|jt
|jddd
d�|jt
|jdd�|jt
|jd
d�dS(stest genconfig() methodR(R%R0R7R8R9itadmin__phpass__identR�s$1$R�s$H$5R�R�s$P$5R�tsaltt.itroundstidents"$P$6........22zGEuacuPOqEpYPDeR0R/R)tfakeiNs........(RR�R�t
startswithR@RRRRRRtRS(R?Rvtc2((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_41_genconfig�s*	"((!
(+cC�sPtdg�}|jd�}x3|jD](\}}|jt|j|||�q(Wtdg�}xE|jD]:\}}|d
kr�qmn|jt|jd||�qmWtdg�}|jt|jdd
�|jtt�jdd�|jt|jd|dd�|jt|jd|dd�|jt|jd|d	d�d
S(stest genhash() methodR$tstubR�R�RR�R�iR�N(	RRtnonstring_vectorsRRRSR�RTRtR�(R?RvRR�Rtconfig((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_42_genhash�s  cC�s�t|j�}|jd�}|j|jd��|j|jd|��|j|jd|��|jt|j	dd�tdg�}x0|j
D]%\}}|jt|j||�q�W|jtt�jd�|jt|jddd	�d
S(stest hash() methodtpasswords$5$rounds=3000$t	passwordxR6i�R$R�R�iN(
Rt
sample_4_dictRR�R�R�R�RRRuRR�RSRt(R?RvRR�R((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_43_hash�scC�sIt|j�}|jdg��*|j|jddddd�d�Wd	QX|jdg��0|j|jdddddd
d�d�Wd	QX|jdg��*|j|jdd
ddd�d�Wd	QX|jdg��*|j|jdd
ddd�d�Wd	QX|jt|jddd�|jt|jddd�d	S(s;test hash() method -- legacy 'scheme' and settings keywordss"passing settings to.*is deprecatedR�R�R0R�R�is"$H$5........De04R5Egz0aq8Tf.1eVhY/NR�R�s"$P$5........De04R5Egz0aq8Tf.1eVhY/R�i�tnacls?$5$rounds=1999$nacl$nmfwJIxqj0csloAAvSER0B8LU0ERCAbhmMug4Twl609i�s?$5$rounds=2001$nacl$8PdeoPL4aXQnJ0woHhqgIw/efyfCKC2WHneOpnvF.31R�R�is........s........(RR�tassertWarningListR@RRRRtRS(R?t
use_16_legacyRv((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_43_hash_legacy�s&



cC�s�dddg}t|dd�}|j|jd�d�|jt|jddt�tdg�}x0|jD]%\}}|jt|j||�qoWt�}|j	|jd�d�|jt
|jddt�|jt|jdd	d
�dS(stest identify() border casesR%R$R&R,is$9$232323123$1287319827trequiredRR�iN(RR@R�RTRRRuRoR�RStassertIsRt(R?R�RvRR((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_44_identify.s	cC�s"dddg}t|dd�}tjjd�}|j|jd|��|j|jd|��|j|jd|dd��|j|jd|dd��|jt|jd|dd�|jt|jd	d
�tdg�}|jd	�}}x3|jD](\}}|jt|j|||�q	W|j	|j|d��tdg�}xE|jD]:\}}|dkr�qgn|jt|jd||�qgW|jtt�jdd�|jt|jd|dd
�|jt|jd|dd�|jt|jd|dd�dS(stest verify() scheme kwdR%R$R&R,iR�R�R�R�s$6$232323123$1287319827R�RR�iR�N(RRR%R�R�RRRuR�RSR�RTRt(R?R�RvR�trefhashR�R((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_45_verifyHs.   c�s2t|j�}|j|jd��|j|jd��|j|jd��|j|jd��|j|jd��|j|jd��g�dtjf�fd��Y}t|g�}|jd	�}}|j|j|��|j�|dfg��2|j|j|d
d��|j�|dfg��2|j|j|d
d��|j�|dfg��2td
g�}x0|j
D]%\}}|jt|j||�q�W|jt
t�jd�|jt
|j|dd�|jt|j|dd�|jt|j|dd�dS(stest needs_update() methodt
9XXD4trGYeGJAs"$1$J8HC2RCr$HcmM.7NxB2weSvlw2FgzU0sK$5$rounds=1999$jD81UCoo.zI.UETs$Y7qSTQ6mTiU9qZB4fRr43wRgQq4V.5AAf7F97Pzxey/sK$5$rounds=2000$228SSRje04cnNCaQ$YGV4RYu.5sNiBvorQDlO0WWQjyJVGKBcJXz3OtyQ2u8sK$5$rounds=3000$fS9iazEwTKi7QPW4$VasgBC8FqlOvD7x2HhABaMXCTh9jwHclPA9j5YQdns.sK$5$rounds=3001$QlFHHifXvpFX4PLs$/0ekt7lSs/lOikSerQ0M/1porEHxYq7W/2hdFpxA3fAtdummyc�s5eZdZdZed�fd��Zd�ZRS(R�t@c�s�j||f�|dkS(Ntnu(tappend(tclsRR�(tcheck_state(s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytneeds_update�scS�sGddlm}t|t�r1|jd�}nt||�j��S(Ni����(tmd5sutf-8(thashlibR�t
isinstanceR
RORt	hexdigest(R?R�R�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyt_calc_checksum�sN(R�R�R�t_hash_prefixtclassmethodRTR�R�((R�(s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR��s
R�R�tbobR�R$RR�R�iR�N(RR�R�R�R�R�R�RR@RTR�RRRSRt(R?RvR�RFRR�R((R�s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_46_needs_update{s6c
C�sjt|j�}|jd�jd�}|jd�jd�}|jd|�\}}|j|�|j|d�|jd|�\}}|j|�|j|d�|jd|�\}}|j|�|j|j	|�d�|jd|�\}}|j|�|j|d�tdg�}|jd�}}x3|j
D](\}}	|jt|j|||	�qHW|j
|j|d�tdf�tdg�}xE|j
D]:\}}	|dkr�q�n|jt|jd||	�q�W|jtt�jdd�|jt|jd|dd	�|jt|jd|dd
�|jt|jd|dd
�dS(
stest verify_and_update()R$R�R1t	wrongpassR�R�RR�R�iR�N(RR�R�Rtverify_and_updateR�R�RTR�R�R�RRRSR@tFalseRt(
R?Rvth1th2toktnew_hashRR�R�R((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_47_verify_and_update�s:



 " c
C�s�ddlm}m}m}|jd�}|jddd�}|jddd�}t||g�}|j|jt��|j	|j
|jd��d�|j	|jd|��|j|jd|�t
d	f�|jdg��!|jt|jddd�Wd	QX|jt|jd|dd�|jt|jd|dd�t||g�}|j|jtdg��|j	|j
|jd��d�|j	|jd|��|j|jd|�t
d	f�|j	|j
|jddd��d�|j	|jd|dd��|j|jd|dd�t
d	f�|jdg��!|jt|jdd
d�Wd	QX|jt|jd|d
d�|jt|jd|d
d�t||gdd�}	|j|	jtdg��|jt|	jd�|jt|	jd|�|jt|	jd|�|j|	jddd�|�|j	|	jd|dd��|j|	jd|dd�t
d	f�|j|	jd|dd�td	f�|j|	jd|dd�t
|f�d	S(
sLhash(), verify(), and verify_and_update() -- discard unused context keywordsi����(R$R%tpostgres_md5R�R�trootR�R$s"passing settings to.*is deprecatedNtbadkwdR2tauto(tpasslib.hashR$R%RRRR@tcontext_kwdstsetR�R�R�RRoRTR�RRRSR(
R?R$R%Rtdes_hashtpg_root_hasht
pg_admin_hashReRfRh((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_48_context_kwds�sH"""""(("((cC�sGtddgdddddd�}d	}|jdd�}|j|jd�|j|jd�|j|jd�|jtgd
��#|j	dddddd�}WdQX|j|j
d
d�d|�|jg��+|j|j
ddd
d�d|�WdQX|j|j
ddd
d�d|�|j|j
ddd
d�d|�|jtgd
��7|j	dtd�ddddtd�d�}WdQX|j|j
d
d�d|�|jg��+|j|j
ddd
d�d|�WdQX|j|j
ddd
d�d|�|j|j
ddd
d�d|�|j|j
d
d�d|�tj
j}|j	ddd|d>�}|j|j
d
d�d||f�|j	dddd�}|j|j
d
d�d|�|jt|j	dd�|j	dd�|j	dd�|jt|j	dd�tddg�}|jt|j	dddd�|jttdd �|jttdd �|jttd!d �|jttdd �tjj�}|jttdd|�|jttdd|�|jttdd!|�|jttdd|�dS("stest rounds limitsR(R1R5i�R4i�R6i�	s+...........................................ii�NR�R�s$5$rounds=1000$nacl$R�i�s$5$rounds=1999$nacl$s$5$rounds=2000$nacl$i�s$5$rounds=2001$nacl$ge��As$5$rounds=999999999$nacl$i�s$5$rounds=3001$nacl$s$5$rounds=3000$nacl$i�s$5$rounds=2999$nacl$s$5$rounds=2500$nacl$is$5$rounds=%d$nacl$%sR~R*(Rt_get_recordRTR@tmin_desired_roundstmax_desired_roundstdefault_roundsR�RRR�tintRR1RRRutdatetimetnowRS(R?RvtSTUBtcustom_handlerR�tdftbad((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_50_rounds_limitsQsj	 &   &   & c	C�stddgdddddd�}|jt|jd	d
�|jt|jd	d�|jt|jd	d�|jd	d
�}|j|jdd�jd
�|j|ddd�|jd	d�}|j|jdd�jd
�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�dS(stest linear vary roundsR(R1R5i�R4i�R6i�R*i����s-1%s101%is0%ii�i�ids0.1%g����MbP?i�i�s100%g�?N(	RRRRuRR@RRTR�tassert_rounds_range(R?RvR�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_51_linear_vary_rounds�s2	c	C�s�tddgdddddd�}|jt|jd	d
�|jt|jd	d�|jt|jd	d�|jd	d
�}|j|jdd�jd
�|j|ddd�|jd	d�}|j|jdd�jd
�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�|jd	d�}|j|jdd�jd�|j|ddd�dS(stest log2 vary roundsR(tbcrypttbcrypt__min_roundsitbcrypt__max_roundsitbcrypt__default_roundsiR*i����s-1%s101%is0%iiiids1%g{�G�z�?s49%g\��(\�?s50%g�?s100%g�?N(	RRRRuRR@RRTR�R(R?RvR�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_52_log2_vary_rounds�s>	cC�s�|j|�}|jdd!|j}t�}xHtd�D]:}|j|d|�}	|j|	�j}
|j|
�q<W|j	t
|�|d�|j	t|�|d�dS(s2helper to check vary_rounds covers specified rangeiii,R�s"vary_rounds had wrong lower limit:s"vary_rounds had wrong upper limit:N(R�tdefault_salt_charst
max_salt_sizeR
RR�RLR�taddR@tmintmax(R?tcontextR�tlowertupperR�R�tseentiR�tr((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyRs	cC�s�tjdddt�tddg�}|j|jd
�|j|jdd�jd
�|j|jdd�jd
�|j|jdd	�jd
�d
S(sharden_verify -- parsingR:s.*harden_verify.*R�R(R1t
harden_verifytttruetfalseN(R=R>tDeprecationWarningRR@R0RTtusing(R?RF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_harden_verify_parsing-scC�spd}d}tj�}||_td|g�}|j�t|j�\}}|j||d||�dS(s'
        dummy_verify() method
        g�������?g�������?R(tdeltaN(t	DelayHashR5tdelayRtdummy_verifyRtassertAlmostEqual(R?texpectedtaccuracyR�RFtelapsedt_((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_dummy_verify9s	
cC�s�dd�}tddd�}|j||d�tttg�|j||d�tttg�|jdd�|j||d�tttg�|j||d�tttg�|jdd	�|j||d�tttg�|j||d�tttg�td
gdd�}|j||d�tg�|j||d�tg�|jttddd�|jttddd
�dS(s+test deprecated='auto' is handled correctlycS�s,g|j�D]}|j||�j^q
S(N(R(R�R2(RFR�R�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytgetstatePss sha256_crypt,md5_crypt,des_cryptR2R
R�R)R%R�R$R1ssha256_crypt,md5_cryptsauto,md5_cryptsmd5_crypt,autoN(RTRR@RRoRRRRu(R?RARF((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_61_autodeprecateMs"""""""cC�s
ddlm}m}tdg�}tddg�}|jd�}|jd�}|jtd|j�|jtd|j|�|jtd|j|�|j�}|j||j	�|j|�}|j||j	|�|j|�}	|j|	|j	|�|j|j|�|�|j
|j|��d}
|jt|
|j|�|jt|
|j|�|jt|
|j|�|j
|j|��|jt|
|j|�|j
|j|��|j
|j|��|jt|
|jd�|jt|jd
�|j|j|�|�|jt|
|j|�|jt|
|j|�|jt|
|j|�|jt|
|jd�|jt|jd
�|j|j|�|�|jt|
|j|�|jtd	|j|�|j|j|�|�d
S(sdisabled hash supporti����(R%t
unix_disabledR$RCtfoosno disabled hasher presentshash could not be identifiedR1scannot restore original hashN(RR%RCRRtassertRaisesRegexRZtdisableR@tdefault_markerR�t
is_enabledRuR�tenableRRRSRT(R?R%RCRFR�th_refth_otherth_dist	h_dis_refth_dis_othertHASH_NOT_IDENTIFIED((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_disabled_hashesmsd













N((JR�R�tdescriptionPrefixR�R�RR�R�RBR"RCRRNRMRVRWR_R`RYR�RPR\RORQR]RRRDRyRbRERcR�R<RGRURaRjRmRpRxRzR�R�R�R�R�RTR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRR$RR6R@RBRP(((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR#1s�			
	
	

														+		%	L	$	\	%				$	O		!				1	$	1		3	G	:	U	v	&	/				 R8cB�s>eZdZdZejZdZdZe	d�Z
d�ZRS(s-dummy hasher which delays by specified amountt
delay_hashi(is$x$cC�sNtj|j�t|t�r1|jd�}nttjd|�j	��S(Nsutf-8tprefix(
ttimetsleepR9R�R
RORR�tsha1R�(R?R�((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR��s(R�R�t__doc__R�R�tLOWER_HEX_CHARStchecksum_charst
checksum_sizeR9RR�R�(((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR8�s	tdummy_2cB�seZdZRS(R[(R�R�R�(((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR[�stLazyCryptContextTestcB�s)eZdZd�Zd�Zd�ZRS(RcC�std�|jtd�dS(NR[(tunload_handler_namet
addCleanup(R?((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR<�s
cC�s�|jtd��tdd�ttddg�ddg�}|jtdt��|j|j�d�|j|j	d�j
�|jtdt��dS(stest plain kwdsR[spasslib.tests.test_contextR$R2N(sdummy_2s	des_crypt(R�thas_crypt_handlerRRtiterRoR@R(R�R�R2(R?Rv((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_kwd_constructor�s
!c�s��jtd��tdd�t�fd�}td|dt�}�jtdt���j|j�d��j|j	d�j
��jtdt��dS(NR[spasslib.tests.test_contextc�s/�j|�tdtddg�ddg�S(NR(R[R$R2(R�R�R`(tflag(R?(s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pytonload�s
RcRbR$(sdummy_2s	des_crypt(R�R_RRRRoR@R(R�R�R2(R?RcRv((R?s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyttest_callable_constructor�s
(R�R�RQR<RaRd(((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyR\�s		(ARWt
__future__Rtpasslib.utils.compatRtconfigparserRtConfigParserRt	functoolsRtloggingt	getLoggerR�tlogRVR=tpasslibRtpasslib.contextRRtpasslib.excRRt
passlib.utilsR	R
RRR
RRRtpasslib.utils.handlerstutilsR�R�tpasslib.tests.utilsRRRRRRtpasslib.registryRRR_RR]RRWtabspathtdirnamet__file__R`R"R#R�RTR�R8R[R\(((s>/usr/lib/python2.7/site-packages/passlib/tests/test_context.pyt<module>s@.."		�������