403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.6
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u119869361 ( 9600978)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/breezy/bzr/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/breezy/bzr/tests/__pycache__/test_smart_request.cpython-313.pyc
�

p��ga(����SrSSKrSSKJrJr SSKJr SSKJr SSK	J
r
Jr "SS\R5r
"S	S
\R5r"SS\R5r"S
S\R5r"SS\R5r"SS\R5r"SS\
5r"SS\
5r"SS\
5r"SS\
5r"SS\5r"SS\5rg)zITests for smart server request infrastructure (breezy.bzr.smart.request).�N)�errors�	transport)�BzrDir)�request)�TestCase�TestCaseWithMemoryTransportc��\rSrSrSrSrSrg)�
NoBodyRequest�z*A request that does not implement do_body.c�.�[R"S5$)N)�ok)r�SuccessfulSmartServerResponse��selfs �E/usr/lib/python3/dist-packages/breezy/bzr/tests/test_smart_request.py�do�NoBodyRequest.dos���4�4�W�=�=��N��__name__�
__module__�__qualname__�__firstlineno__�__doc__r�__static_attributes__rrrr
r
s
��4�>rr
c��\rSrSrSrSrSrg)�DoErrorRequest�"z.A request that raises an error from self.do().c�.�[R"S5e�N�xyzzy�r�
NoSuchFilers rr�DoErrorRequest.do%����"�"�7�+�+rrNrrrrrr"s
��8�,rrc��\rSrSrSrSrSrg)�DoUnexpectedErrorRequest�)z7A request that encounters a generic error in self.do().c��0S g)N�rrs rr�DoUnexpectedErrorRequest.do,s	��
�1�rrNrrrrr(r()s
��A�rr(c�$�\rSrSrSrSrSrSrg)�ChunkErrorRequest�0z4A request that raises an error from self.do_chunk().c��g�zNo-op.Nrrs rr�ChunkErrorRequest.do3���rc�.�[R"S5er!r#�r�bytess  r�do_chunk�ChunkErrorRequest.do_chunk7r&rrN)rrrrrrr7rrrrr.r.0s��>�
�,rr.c�*�\rSrSrSrSrSrSrSrg)�EndErrorRequest�;z2A request that raises an error from self.do_end().c��gr1rrs rr�EndErrorRequest.do>r3rc��gr1rr5s  rr7�EndErrorRequest.do_chunkBr3rc�.�[R"S5er!r#rs r�do_end�EndErrorRequest.do_endFr&rrN)	rrrrrrr7rArrrrr:r:;s��<�
�
�,rr:c�,�\rSrSrSrSrSrSrSrg)�CheckJailRequest�Jc�T�[RR"U/UQ76 /Ulg�N)r�SmartServerRequest�__init__�jail_transports_log)r�argss  rrI�CheckJailRequest.__init__Ks#���"�"�+�+�D�8�4�8�#%�� rc�j�URR[RR5 grG�rJ�appendr�	jail_info�
transportsrs rr�CheckJailRequest.doO�"��� � �'�'��(9�(9�(D�(D�Erc�j�URR[RR5 grGrNr5s  rr7�CheckJailRequest.do_chunkRrSrc�j�URR[RR5 grGrNrs rrA�CheckJailRequest.do_endUrSr)rJN)	rrrrrIrr7rArrrrrDrDJs��&�F�F�FrrDc��\rSrSrSrSrg)�
TestErrors�Yc�f�[R"S5nURS[U55 g)Nz
class namez1The smart server method 'class name' is disabled.)r�DisabledMethod�assertEqualDiff�str)r�errors  r�test_disabled_method�TestErrors.test_disabled_methodZs)���&�&�|�4�����?��U��	
rrN)rrrrr`rrrrrYrYYs��
rrYc�&�\rSrSrSrSrSrSrg)�TestSmartRequest�ac��[R"SS[0S5nURS5 UR	5 g)zxIf a request has no body data, and the request's implementation does
not override do_body, then no exception is raised.
N�foo�/�rf)r�SmartServerRequestHandlerr
�
args_received�end_received�r�handlers  r�"test_request_class_without_do_body�3TestSmartRequest.test_request_class_without_do_bodybs8���3�3�D�6�=�:Q�SV�W�����i�(����rc��Sn[R"US[0S5nURS5 UR	S[R
R5 URS5 UR	S[R
R5 UR5 UR	S[R
R5 UR	U//S-URR5 g)Nzdummy transportrfrgrh�bytes�)rrirDrj�assertEqualrPrQ�accept_bodyrk�_commandrJ)rrrms   r� test_only_request_code_is_jailed�1TestSmartRequest.test_only_request_code_is_jailedns���%�	��3�3��� 0�1�3�
��	���i�(�����w�0�0�;�;�<����H�%�����w�0�0�;�;�<���������w�0�0�;�;�<����9�+���*�G�,<�,<�,P�,P�Qrc��/nSn[RR5H=n[RRU5nUbXB;dM,UR	U5 M? U(a!URSR
U55 gg)N)�read�idem�mutate�semivfs�semi�streamz?These requests were not categorized as safe/unsafe to retry: {})r�request_handlers�keys�get_inforO�fail�format)r�unclassified_requests�allowed_info�key�infos     r�1test_all_registered_requests_are_safety_qualified�BTestSmartRequest.test_all_registered_requests_are_safety_qualified{sz�� "��N���+�+�0�0�2�C��+�+�4�4�S�9�D��|�t�7�%�,�,�S�1�3�!��I�I� � &��'<� =�
�!rrN)rrrrrnrvr�rrrrrcrcas��	�R�rrcc�<�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�'TestSmartRequestHandlerErrorTranslation�zTests that SmartServerRequestHandler will translate exceptions raised by
a SmartServerRequest into FailedSmartServerResponses.
c�<�URSUR5 grG)rs�responserls  r�assertNoResponse�8TestSmartRequestHandlerErrorTranslation.assertNoResponse�s������w�/�/�0rc�h�SnUR[R"U5UR5 g)N)�
NoSuchFilesxyzzy)rsr�FailedSmartServerResponser�)rrm�expected_translations   r�assertResponseIsTranslatedError�GTestSmartRequestHandlerErrorTranslation.assertResponseIsTranslatedError�s-��8������-�-�.B�C�W�EU�EU�	
rc��[R"SS[0S5nURS5 UR	U5 g�Nrfrgrh)rrirrjr�rls  r�)test_error_translation_from_args_received�QTestSmartRequestHandlerErrorTranslation.test_error_translation_from_args_received�s8���3�3�D�6�>�:R�TW�X�����i�(��,�,�W�5rc���[R"SS[0S5nURS5 UR	U5 URS5 UR
U5 g)Nrfrgrhrq)rrir.rjr�rtr�rls  r�*test_error_translation_from_chunk_received�RTestSmartRequestHandlerErrorTranslation.test_error_translation_from_chunk_received�sY���3�3��6�,�-�s�
��	���i�(����g�&����H�%��,�,�W�5rc���[R"SS[0S5nURS5 UR	U5 UR5 UR
U5 gr�)rrir:rjr�rkr�rls  r�(test_error_translation_from_end_received�PTestSmartRequestHandlerErrorTranslation.test_error_translation_from_end_received�sV���3�3��6�?�+�S�
��	���i�(����g�&������,�,�W�5rc���[R"SS[0S5nURS5 UR	[R
"S5UR5 g)Nrfrgrh)�errorsKeyError�1)rrir(rjrsr�r�rls  r�!test_unexpected_error_translation�ITestSmartRequestHandlerErrorTranslation.test_unexpected_error_translation�sU���3�3��6�3�4�c�
��	���i�(�����-�-�.K�L����	
rrN)rrrrrr�r�r�r�r�r�rrrrr�r��s%���1�
�6�
6�6�
rr�c�N�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
Srg
)�!TestRequestHanderErrorTranslation�z4Tests for breezy.bzr.smart.request._translate_error.c�P�URU[R"U55 grG)rsr�_translate_error)r�expected_tupler_s   r�assertTranslationEqual�8TestRequestHanderErrorTranslation.assertTranslationEqual�s�������)A�)A�%�)H�Irc�P�URS[R"S55 g)N)r�spath�path)r�rr$rs r�test_NoSuchFile�1TestRequestHanderErrorTranslation.test_NoSuchFile�s ���#�#�$�i�&:�&:�6�&B�	
rc�R�URS[R"SS55 g)N)sLockContention�lock�msg)r�r�LockContentionrs r�test_LockContention�5TestRequestHanderErrorTranslation.test_LockContention�s$��	
�#�#� �&�"7�"7���"F�	
rc�R�URS[R"SS55 g)N)s
TokenMismatch�
some-token�actual-tokenr�r�)r�r�
TokenMismatchrs r�test_TokenMismatch�4TestRequestHanderErrorTranslation.test_TokenMismatch�s#���#�#�>�� � ���@�	
rc�8�URS[55 g)N)sMemoryError)r��MemoryErrorrs r�test_MemoryError�2TestRequestHanderErrorTranslation.test_MemoryError�s���#�#�$5�{�}�Erc�R�URS[R"SS55 g)N)sGhostRevisionsHaveNoRevno�revid1�revid2r�r�)r�r�GhostRevisionsHaveNoRevnors r�test_GhostRevisionsHaveNoRevno�@TestRequestHanderErrorTranslation.test_GhostRevisionsHaveNoRevno�s#���#�#�@��,�,�Y�	�B�	
rc�8�URS[55 g)N)r�s	Exceptionr)r��	Exceptionrs r�test_generic_Exception�8TestRequestHanderErrorTranslation.test_generic_Exception�s���#�#�$A�9�;�Orc�L�URS[R"SS95 g)N)r�sBzrErrors	some textz	some text)r�)r�r�BzrErrorrs r�test_generic_BzrError�7TestRequestHanderErrorTranslation.test_generic_BzrError�s���#�#�1�6�?�?�{�3S�	
rc�h�SSKJn SnURSSURS54U"U55 g)Nr)r_z7Error -3 while decompressing data: incorrect data checkr�s
zlib.errorzutf-8)�zlibr_r��encode)rr_r�s   r�test_generic_zlib_error�9TestRequestHanderErrorTranslation.test_generic_zlib_error�s1���G���#�#�
�}�c�j�j��&9�:�E�#�J�	
rrN)rrrrrr�r�r�r�r�r�r�r�r�rrrrr�r��s5��>�J�
�

�
�F�
�P�
�

rr�c��\rSrSrSrSrg)�TestRequestJail��c��URS5n[R"U5nURS[RR
5 UR
5 URU/[RR
5 UR5 URS[RR
5 g)N�blah)�
get_transportrrHrsrPrQ�
setup_jail�
teardown_jail)rr�reqs   r�	test_jail�TestRequestJail.test_jail�s����&�&�v�.�	��(�(��3������w�0�0�;�;�<��������)��g�&7�&7�&B�&B�C���������w�0�0�;�;�<rrN)rrrrr�rrrrr�r��s��=rr�c�4^�\rSrSrU4SjrSrSrSrU=r$)�TestJailHook�c�J>�[TU]5 SnURU5 g)Nc�.�S[RlgrG)rrPrQrrr�clear_jail_info�+TestJailHook.setUp.<locals>.clear_jail_info�s��+/�G���(r)�super�setUp�
addCleanup)rr��	__class__s  �rr��TestJailHook.setUp�s���
��
��	0�	
����(rc��S[Rl[RnUR	S5nU"U5 U/[RlU"U5 U"URS55 UR
[RXRS55 UR
[RU[R"S55 g)N�foo�childz..zhttp://host/)rrPrQ�_pre_open_hookr��clone�assertRaisesr�	JailBreakr�get_transport_from_url)rr��ts   r�test_jail_hook�TestJailHook.test_jail_hooks���'+����$� �/�/�����u�%���q��()�s����$��q���q�w�w�w�'�(����&�*�*�N�G�G�D�M�J���������,�,�^�<�	
rc��^^�URS5nURm/mUU4Sjn[R"US9nUR	5 UR5 UR
S/T5 g)z�Opening a bzrdir in a non-main thread should work ok.

This makes sure that the globally-installed
breezy.bzr.smart.request._pre_open_hook, which uses a threading.local(),
works in a newly created thread.
�.c�T>�[R"T5 TRS5 g)Nr
)r�open_from_transportrO)�
thread_resultrs��rr��;TestJailHook.test_open_bzrdir_in_non_main_thread.<locals>.ts����&�&�y�1�� � ��&r)�targetr
N)�make_controldir�root_transport�	threading�Thread�start�joinrs)r�bzrdirr��threadr�rs    @@r�#test_open_bzrdir_in_non_main_thread�0TestJailHook.test_open_bzrdir_in_non_main_threads`����%�%�c�*���)�)�	��
�	'��!�!��+���������
����$���/rr)	rrrrr�r�rr�
__classcell__)r�s@rr�r��s���)�
�(0�0rr�)rr�breezyrr�breezy.bzr.bzrdirr�breezy.bzr.smartr�breezy.testsrrrHr
rr(r.r:rDrYrcr�r�r�r�rrr�<module>r
s���"P��$�$�$�>�>�G�.�.�>�,�W�/�/�,��w�9�9��,��2�2�,�,�g�0�0�,�F�w�1�1�F�
��
�%�x�%�P-
�h�-
�`0
��0
�f=�1�=�/0�.�/0r

Youez - 2016 - github.com/yon3zu
LinuXploit