+
    i$                         R t ^ RIHt ^ RIHt ^ RIt^ RIt^ RIHtH	t	H
t
 ^ RIHtHtHtHtHt ^ RIHu Ht ^ RIHt ]! ]4      t ! R R]P4                  4      t ! R	 R
]P4                  4      t^t ! R R]4      tR# )z>tests for passlib.hash -- (c) Assurance Technologies 2003-2009)with_statement)	getLoggerN)hashregistryexc)register_crypt_handlerregister_crypt_handler_pathget_crypt_handlerlist_crypt_handlers_unload_handler_name)TestCasec                       ] tR t^tR tRtR# )dummy_0 N__name__
__module____qualname____firstlineno__name__static_attributes__r       Y/var/www/html/photoedit/myenv/lib/python3.14/site-packages/passlib/tests/test_registry.pyr   r          Dr   r   c                       ] tR t^tRtRtR# )alt_dummy_0r   r   Nr   r   r   r   r   r      r   r   r   c                   Z   a a ] tR t^&t oRtV 3R ltR tR tR tR t	R t
R tR	tVtV ;t# )
RegistryTestzpasslib.registryc                   <aa \         \        V `  4        \        \        P
                  4      o\        \        P                  4      oVV3R  lpV P                  V4       R# )c                     < \         P                  P                  4        \         P                  P                  S4       \         P                  P                  4        \         P                  P                  S 4       R # )N)r   
_locationsclearupdate	_handlers)handlers	locationss   r   restore#RegistryTest.setUp.<locals>.restore0   sO    %%'&&y1$$&%%h/r   N)superr   setUpdictr   r    r#   
addCleanup)selfr&   r$   r%   	__class__s   & @@r   r)   RegistryTest.setUp*   sE    lD') ,,-	**+	0
 	 r   c                x   \        \        4       \        \        4       V P                  \        \
        \        R4       \        \        RR4      p\        4       pV\        n        V P                  \        P                  V4       Vf'   \        =V P                  \        \        R4      4       M+V\        n        V P                  \        P                  V4        ! R R\        P                  4      pV\        n        V P                  \        R4      V4       V P                  \        \         \        RV4       R# )ztest passlib.hash proxy objectfooey
__loader__Nc                       ] tR t^PtRtRtR# )-RegistryTest.test_hash_proxy.<locals>.dummy_1dummy_1r   Nr   r   r   r   r4   r3   P       Dr   r4   dummy_1x)dirr   reprassertRaisesAttributeErrorgetattrobjectr1   assertIsassertFalsehasattruhStaticHandlerr4   r	   
ValueErrorsetattr)r,   oldtestr4   s   &   r   test_hash_proxyRegistryTest.test_hash_proxy7   s     	D	 	T
 	.'4A dL$/xdoot,;WT<89!DOMM$//3/	b&& 	'	2G< 	*gtZIr   c                8   \         P                  pV P                  RV9  4       V P                  \	        \
        R4      4       V P                  \        \        RR4       V P                  \        \        R\        R,           4       V P                  \        \        R\        R,           4       \        R\        4       V P                  R\        4       9   4       V P                  R\        RR7      9  4       V P                  \
        P                  \        4       V P                  R\        RR7      9   4       \        R4       \        R\        R,           4       V P                  \
        P                  \        4       \        R4       \        R\        4       V P                  \        \         R4       \        R	\        4       V P                  \        \         R	4       \        R	4       \"        P$                  P'                  R
R4       \        RR
4       \(        P*                  ! 4       ;_uu_ 4        \(        P,                  ! RR\.        4       \!        R4      pRRR4       ^ RIHp V P                  XVP4                  4       R#   + '       g   i     L4; i)z"test register_crypt_handler_path()r   z.test_registryz:dummy_0:xxxz:dummy_0.xxxT)loaded_onlyz:alt_dummy_0dummy_xr   z passlib.tests._test_bad_registerN	dummy_badignore
xxxxxxxxxx)_test_bad_register)r   r    
assertTruer>   r?   r   r9   rB   r   r   r
   r=   r   unload_handler_namer   	TypeErrorr	   sysmodulespopwarningscatch_warningsfilterwarningsDeprecationWarningpasslib.testsrN   alt_dummy_bad)r,   pathshtbrs   &   r    test_register_crypt_handler_path-RegistryTest.test_register_crypt_handler_pathX   s    ## 		./y12 	*&A#%5	7*&A#X%>	@*&A#X%>	@ 	$Ix8	%8%::;	)<)NNOdllG,	%8T%JJKI& 	$Ix./HIdllK0I& 	$Ix8)%6	B 	$M8<*&7GM* 	:DA#K1ST$$&&##Hl<NO!+.A ' 	<a**+	 '&s   5(J		J	c                   V P                  \        \        / 4       V P                  \        \        \	        R\
        P                  3\        RR7      4      4       V P                  \        \        \	        R\
        P                  3\        RR7      4      4       V P                  \        \        \	        R\
        P                  3\        RR7      4      4       V P                  \        \        \	        R\
        P                  3\        RR7      4      4       V P                  \        \        \	        R\
        P                  3\        RR7      4      4        ! R R	\
        P                  4      p ! R
 R\
        P                  4      pV P                  R	\        4       9  4       \        V4       \        V4       V P                  \        R	4      V4       V P                  \        \        V4       V P                  \        R	4      V4       \        VRR7       V P                  \        R	4      V4       V P                  R	\        4       9   4       R# )ztest register_crypt_handler()xN)r   AB_CDzab-cdab__cddefaultc                       ] tR t^tRtRtR# )9RegistryTest.test_register_crypt_handler.<locals>.dummy_1r4   r   Nr   r   r   r   r4   rf      r5   r   r4   c                       ] tR t^tRtRtR# ):RegistryTest.test_register_crypt_handler.<locals>.dummy_1br4   r   Nr   r   r   r   dummy_1brh      r5   r   ri   T)force)r9   rQ   r   rB   typer@   rA   r*   rO   r
   r=   r	   KeyError)r,   r4   ri   s   &  r   test_register_crypt_handler(RegistryTest.test_register_crypt_handler   s    	)%;R@*&<d3IYIYH[]agk]l>mn*&<d3IYIYH[]agn]o>pq*&<d3IYIYH[]agn]o>pq*&<d3IYIYH[]ago]p>qr*&<d3IYIYH[]agp]q>rs	b&& 		r'' 	 		)<)>>?w'w''	2G<($:HE'	2G<xt4'	2H=	%8%::;r   c                    ! R R\         P                  4      pV P                  \        \        R4       V P                  \	        RR4      R4       \        V4       V P                  \	        R4      V4       \        P                  ! 4       ;_uu_ 4        \        P                  ! RR\        4       V P                  \	        R4      V4       \        R\        4       V P                  \	        R4      \        4       RRR4       ^ R	IHp R
VP                   R&   R F:  pV P                  \        \        V4       V P                  \	        VR4      R4       K<  	  R#   + '       g   i     Lg; i)ztest get_crypt_handler()c                       ] tR t^tRtRtR# )4RegistryTest.test_get_crypt_handler.<locals>.dummy_1r4   r   Nr   r   r   r   r4   rq      r5   r   r4   NrL   zMhandler names should be lower-case, and use underscores instead of hyphens:.*zDUMMY-1r   zDUMMY-0)r   dummy_fake)rs   __package__)r@   rA   r9   rl   r	   r=   r   rU   rV   rW   UserWarningr   r   r   passlibr   __dict__)r,   r4   r   r   s   &   r   test_get_crypt_handler#RegistryTest.test_get_crypt_handler   s   	b&& 	 	($5yA'	48$? 	w''	2G<$$&&##H.}  @K  L MM+I6@ (	8<MM+I6@ ' 	!!(g,Dh(94@MM+D$7> - '&s   A'EE*	c                    ^ RI Hp R\        P                  R&   V! 4        F+  pV P	                  VP                  R4      RV,          4       K-  	  \        R4       R# )ztest list_crypt_handlers()r
   rr   rs   _z%r: N)passlib.registryr
   r   rw   r>   
startswithrP   )r,   r
   r   s   &  r   test_list_crypt_handlers%RegistryTest.test_list_crypt_handlers   sG    8 ")g')DT__S16D=A *G$r   c                   ^ RI Hp ^ RIHpHp V! 4        FP  pVP                  R4      '       d   VR,          V! 4       9   d   K/  VR9   d   K8   V P                  V! V4      4       KR  	  R#   \        P                   d    YC9   d    Kt  h i ; i)z-verify we have tests for all builtin handlersr{   )get_handler_caseconditionally_available_hashesldap_:   NNN)roundup_plaintext)	r}   r
   passlib.tests.test_handlersr   r   r~   rO   r   MissingBackendError)r,   r
   r   r   r   s   &    r   test_handlersRegistryTest.test_handlers   s|    8`')Dw''DH8K8M,M,, 0 67 * ** 9s   A,,B
Br   )r   r   r   r   descriptionPrefixr)   rF   r^   rm   rx   r   r   r   __classdictcell____classcell__)r-   __classdict__s   @@r   r   r   &   s6     *!JB.,`<>?>% r   r   )__doc__
__future__r   loggingr   rU   rR   rv   r   r   r   r}   r   r   r	   r
   r   rP   passlib.utils.handlersutilsr$   r@   passlib.tests.utilsr   r   logrA   r   r   rJ   r   r   r   r   <module>r      sv    D &   
 ( 'X X # # (b """  
z8 zr   