Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/zope/component/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/zope/component/tests/test_hooks.pyc
�
6j/Qc@s5dZddlZdejfd��YZdejfd��YZdejfd��YZd	ejfd
��YZdejfd��YZd
ejfd��YZdejfd��YZ	dejfd��YZ
dejfd��YZe�Z
defd��YZdefd��YZd�ZdS(sTests for z.c.hooks
i����NtTest_read_propertycBs#eZd�Zd�Zd�ZRS(cCsddlm}|S(Ni����(t
read_property(tzope.component.hooksR(tselfR((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt_getTargetClassscsqdtf�fd��Y}|�}�j|jd�d|_�j|jd�|`�j|jd�dS(NtFoocseZ�j�d��ZRS(cSsdS(NtBAR((R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pytbars(t__name__t
__module__RR((R(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRsRtBAZ(tobjecttassertEqualR(RRtfoo((RsC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_via_instances		csadtf�fd��Y}|j}�jt|�j����j|jt��d�dS(NRcseZ�j�d��ZRS(cSsdS(NR((R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR's(RR	RR((R(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR&sR(RRt
assertTruet
isinstanceRRtfunc(RRR((RsC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_via_class%s	(RR	RRR(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRs		t
SiteInfoTestscBs,eZd�Zd�Zd�Zd�ZRS(cCsddlm}|S(Ni����(tSiteInfo(RR(RR((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR1scCs
|j��S(N(R(R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt_makeOne5scCsRddlm}|�}|j�}|j|jd�|j|j|k�dS(Ni����(tgetGlobalSiteManager(tzope.component.globalregistryRRRtsitetNoneRtsm(RRtgsmtsi((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_initial8s
	cs�t��dtf�fd��Y�dtf�fd��Y}|j�}|�|_|jd|jk�|j|j�k�|jd|jk�|`|jd|jk�dS(Nt	_RegistrycseZ�ZRS((RR	tadapter_hook((t_hook(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRAst_SiteManagercseZ��ZRS((RR	tadapters((R(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR!CsR(RRRtassertFalset__dict__RR(RR!R((RR sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_adapter_hook?s	(RR	RRRR%(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR/s			tTest_setSitecBs#eZd�Zd�Zd�ZRS(cCsddlm}||�S(Ni����(tsetSite(RR'(RRR'((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt_callFUTPscCs�ddlm}ddlm}|�}t�}t�}t�}t�}||_||_||_t	|d|��|j
d�WdQX|j|j|k�|j|jdk�|j
d|jk�dS(Ni����(thooks(RtsiteinfoR(tzope.componentR)RRRt_DummySiteInfoRRtadapterhookt_MonkeyR(RRR#R$(RR)RRt_SM2t_SITEt_HOOKR*((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_w_NoneTs								cs�ddlm}t��dtf�fd��Y}t�}|�}t|d|��|j|�WdQX|j|j�k�|j|j|k�|j	d|j
k�dS(Ni����(R)t_SitecseZ�fd�ZRS(cs�S(N((R(R/(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pytgetSiteManageris(RR	R4((R/(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR3hsR*R(R+R)RR,R.R(RRRR#R$(RR)R3R*t_site((R/sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_w_sitees			(RR	R(R2R6(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR&Ns		tTest_getSitecBs#eZd�Zd�Zd�ZRS(cCsddlm}|�S(Ni����(tgetSite(RR8(RR8((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR(vscCshddlm}ddlm}|�}t�}t|d|��|j|j�dk�WdQXdS(Ni����(R)(RR*(	R+R)RRR,R.RR(R(RR)RRR*((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR2zs		cCs�ddlm}ddlm}|�}t�}t�}t�}||_||_t|d|��|j	|j
�|k�WdQXdS(Ni����(R)(RR*(R+R)RRRR,RRR.RR((RR)RRR/R0R*((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR6�s						(RR	R(R2R6(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR7ts		t	Test_sitecBseZd�Zd�ZRS(cCsddlm}||�S(Ni����(R(RR(Rtnew_siteR((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR(�scsddlm}ddlm}|�}t��dtf�fd��Y}|�}t�}|j|jdk�|j|j	t
k�t|d|��s|j|��1|j|j|k�|j|j	�k�WdQX|j|jdk�|j|j	|k�WdQXdS(Ni����(R)(RR3cseZ�fd�ZRS(cs�S(N((R(R/(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR4�s(RR	R4((R/(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR3�sR*(
R+R)RRRR,RRRRt_SMR.R((RR)RRR3R5R*((R/sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_it�s				(RR	R(R<(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR9�s	tTest_getSiteManagercBs/eZdd�Zd�Zd�Zd�ZRS(cCsddlm}||�S(Ni����(R4(RR4(RtcontextR4((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR(�scCszddlm}ddlm}|�}t�}t�}||_t|d|��|j|j	�|k�WdQXdS(Ni����(R)(RR*(
R+R)RRRR,RR.RR((RR)RRR/R*((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_default�s				cCs�ddlm}ddlm}|�}t�}t�}||_t|d|��$|j|j	t��|k�WdQXdS(Ni����(R)(RR*(
R+R)RRRR,RR.RR((RR)RRR/R*((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt+test_w_explicit_context_no_IComponentLookup�s				cCs�ddlm}ddlm}ddlm}ddlm}dtfd��Y}|�}|j	||f|d�t�}t
�}||_t�}	t|d	|��|j
|	�}
WdQX|jt|
|��|j|
j|	k�dS(
Ni����(t	Interface(R)(R(tIComponentLookupt_LookupcBseZd�ZRS(cSs
||_dS(N(R>(RR>((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt__init__�s(RR	RD(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRC�stR*(tzope.interfaceRAR+R)RRtzope.component.interfacesRBRtregisterAdapterR,RR.R(RRR>(RRAR)RRBRCRR/R*R>R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt*test_w_explicit_context_w_IComponentLookup�s					N(RR	RR(R?R@RI(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR=�s	
	
tTest_adapter_hookcBs)eZddd�Zd�Zd�ZRS(REcCs#ddlm}|||||�S(Ni����(R(RR(Rt	interfaceRtnametdefaultR((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR(�sc	s�ddlm}ddlm}ddlm}d|fd��Y}|�}t��t�}t�}g���fd�}t�}	||	_t	|d|	��|j
||d	|�}
WdQX|j|
�k�|j�||d	|fg�dS(
Ni����(RA(R)(RtIFoocBseZRS((RR	(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRN�scs�j||||f��S(N(tappend(RKRRLRM(t_ADAPTERt_called(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt
_adapter_hook�sR*R(
RFRAR+R)RRRR,RR.R(RR(RRAR)RRNRt_DEFAULTt_CONTEXTRRR*tadapter((RPRQsC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_success�s 						c	sddlm}ddlm}ddlm}ddlm�d|fd��Y}|�}t�}t�}g���fd�}t	�}	||	_
t|d	|	��|j||d
|�}
WdQX|j
|
|k�|j�||d
|fg�dS(Ni����(RA(R)(R(tComponentLookupErrorRNcBseZRS((RR	(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRN�scs)�j||||f��d��dS(Nttesting(RO(RKRRLRM(RWRQ(sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRR�sR*R(RFRAR+R)RRRGRWRR,RR.R(RR(RRAR)RRNRRSRTRRR*RU((RWRQsC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyttest_hook_raises�s 					N(RR	RR(RVRY(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRJ�s	t
Test_setHookscBseZd�Zd�ZRS(cCsddlm}|�S(Ni����(tsetHooks(RR[(RR[((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR(
scCs�ddl}ddlm}dtfd��Y}|�}|�}t|jjd|d|��|j�WdQX|j|j	|j
�|j|j	|j�dS(Ni����(R)t_HookcBseZd�Zd�ZRS(cSs
d|_dS(N(Rt_hooked(R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRDscSs
||_dS(N(R](Rtvalue((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pytsethooks(RR	RDR_(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR\s	RR4(tzope.component._apiR+R)RR.t	componentt_apiR(RR]RR4(RtzopeR)R\RR4((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR<s		
(RR	R(R<(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRZs	tTest_resetHookscBseZd�Zd�ZRS(cCsddlm}|�S(Ni����(t
resetHooks(RRe(RRe((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR("scCs�ddl}dtfd��Y}|�}|�}t|jjd|d|��|j�WdQX|j|j�|j|j�dS(Ni����R\cBseZd�Zd�ZRS(cSs
t|_dS(N(tFalset_reset(R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRD)scSs
t|_dS(N(tTrueRg(R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pytreset+s(RR	RDRi(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR\(s	RR4(R`RR.RaRbR(RRg(RRcR\RR4((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR<&s		
(RR	R(R<(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRd s	R,cBseZeZdZRS(N(RR	R;RRR(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR,8sR.cBs#eZd�Zd�Zd�ZRS(cKsk||_tg|D]}|t||�f^q�|_x*|j�D]\}}t|||�qGWdS(N(tmoduletdicttgetattrt
to_restoretitemstsetattr(RRjtkwtkeyR^((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyRD>s	1cCs|S(N((R((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt	__enter__DscCs7x0|jj�D]\}}t|j||�qWdS(N(RmRnRoRj(Rtexc_typetexc_valtexc_tbRqR^((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt__exit__Gs(RR	RDRrRv(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyR.<s		cCsytjtjt�tjt�tjt�tjt�tjt�tjt�tjt	�tjt
�tjt�f	�S(N(tunittestt	TestSuitet	makeSuiteRRR&R7R9R=RJRZRd(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt
test_suiteLs(t__doc__RwtTestCaseRRR&R7R9R=RJRZRdRR;R,R.Rz(((sC/usr/lib/python2.7/site-packages/zope/component/tests/test_hooks.pyt<module>s&.1	

Spamworldpro Mini