403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/test_unittest/testmock/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/test_unittest/testmock/__pycache__/testsealable.cpython-313.pyc
�

��i����SSKrSSKJr "SS5r"SS\R5r\S:Xa\R"5 gg)�N)�mockc� �\rSrSrSrSrSrg)�SampleObject�c��g�N���selfs �=C:\Python313\\Lib\test\test_unittest\testmock\testsealable.py�method_sample1�SampleObject.method_sample1���d�c��grr	r
s r�method_sample2�SampleObject.method_sample2	rrr	N)�__name__�
__module__�__qualname__�__firstlineno__r
r�__static_attributes__r	rrrrs��"�"rrc��\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSrg)�TestSealable�c�V�[R"5nURUR[R5 URUR5[R5 URUR5R	5[R5 gr)r�Mock�assertIsInstance�test�test2�r�ms  r�,test_attributes_return_more_mocks_by_default�9TestSealable.test_attributes_return_more_mocks_by_defaults`���I�I�K�����a�f�f�d�i�i�0����a�f�f�h��	�	�2����a�f�f�h�n�n�.��	�	�:rc�<�[R"5n[R"U5 UR[5 UR
 SSS5 UR[5 U"5 SSS5 g!,(df   N4=f!,(df   g=fr�rr�seal�assertRaises�AttributeErrorrr!s  r�.test_new_attributes_cannot_be_accessed_on_seal�;TestSealable.test_new_attributes_cannot_be_accessed_on_seals]���I�I�K���	�	�!��
�
�
�~�
.�
�F�F�/�
�
�
�~�
.�
�C�/�
.�/�
.��
.�
.�s�
A<�+B
�<
B
�
Bc���[R"5n[R"U5 UR[5 SUlSSS5 g!,(df   g=f�N�r&r!s  r�)test_new_attributes_cannot_be_set_on_seal�6TestSealable.test_new_attributes_cannot_be_set_on_seals9���I�I�K���	�	�!��
�
�
�~�
.��A�F�/�
.�
.���A�
A c���[R"5nSURl[R"U5 SURlURURRS5 g)Nr.�)rrrr r'�assertEqualr!s  r�+test_existing_attributes_can_be_set_on_seal�8TestSealable.test_existing_attributes_can_be_set_on_seal%sF���I�I�K��������	�	�!���������������q�)rc��[R"5nSURl[R"U5 UR[5 SURlSSS5 g!,(df   g=fr-)rrrr r'r(r)�test3r!s  r�2test_new_attributes_cannot_be_set_on_child_of_seal�?TestSealable.test_new_attributes_cannot_be_set_on_child_of_seal-sH���I�I�K��������	�	�!��
�
�
�~�
.��A�F�F�L�/�
.�
.�s�A-�-
A;c��[R"5nSURl[R"U5 URUR5S5 g)N�)rrr�return_valuer'r4r!s  r�+test_existing_attributes_allowed_after_seal�8TestSealable.test_existing_attributes_allowed_after_seal5s:���I�I�K��������	�	�!���������1�%rc��[R"SS9n[R"U5 URURS5 g)Nr.)�
test_value)rrr'r4rAr!s  r�.test_initialized_attributes_allowed_after_seal�;TestSealable.test_initialized_attributes_allowed_after_seal=s/���I�I��#���	�	�!��������q�)rc���[R"5n[R"U5 UR[5 U"5 SSS5 g!,(df   g=fr)rrr'r(r)r!s  r�test_call_on_sealed_mock_fails�+TestSealable.test_call_on_sealed_mock_failsCs7���I�I�K���	�	�!��
�
�
�~�
.�
�C�/�
.�
.�r1c��[R"SS9n[R"U5 URU"5S5 g)Nr)r=)rrr'r4r!s  r�)test_call_on_defined_sealed_mock_succeeds�6TestSealable.test_call_on_defined_sealed_mock_succeedsJs-���I�I�1�%���	�	�!�������a� rc�0�[R"5nSURR5l[R
"U5 UR
URR5RS5 UR[5 URR5R SSS5 UR[5 URR SSS5 g!,(df   NC=f!,(df   g=f)N�)
rr�test1r r8r'r4r(r)�test4r!s  r�&test_seals_recurse_on_added_attributes�3TestSealable.test_seals_recurse_on_added_attributesPs����I�I�K�� !����
�
����	�	�!�����������.�.��2�
�
�
�~�
.�
�G�G�M�M�O�!�!�/�
�
�
�~�
.�
�G�G�M�M�/�
.�/�
.��
.�
.�s�%C6�D�6
D�
Dc���[R"5nSURRSlSURRSSl[R
"U5 UR
URRSRS5 UR
URRSSRS5 UR[5 URRSR SSS5 UR[5 URRSSR SSS5 g!,(df   NP=f!,(df   g=f)NrK�ar3r)
r�	MagicMockrLr r8r'r4r(r)rMr!s  r�#test_seals_recurse_on_magic_methods�0TestSealable.test_seals_recurse_on_magic_methods\s����N�N���#$����
�
�c�� �#$����
�
�a��� ��	�	�!����������s�+�1�1�1�5���������q��+�1�1�1�5�
�
�
�~�
.�
�G�G�M�M�#��$�$�/�
�
�
�~�
.�
�G�G�M�M�!�A��$�$�/�
.�/�
.��
.�
.�s�#$E�$$E"�
E�"
E0c��[R"SS9n[R"SS9URlSURRl[R
"U5 UR
URRRS5 URRR SURRlg)N�	root_mock��name�
not_sealedrKr.)rrrLr r8r'r4rMr!s  r�,test_seals_dont_recurse_on_manual_attributes�9TestSealable.test_seals_dont_recurse_on_manual_attributesjs~���I�I�;�'���	�	�|�4����
�����
�
���	�	�!����������,�,�a�0�	���
�
�������
�
�rc�f�[R"[5nSUlSUl[R
"U5 UR
URS5 UR
URS5 UR[5 UR SSS5 g!,(df   g=f)z0You are not restricted when using mock with specr.r<N)
rrr�attr_sample1�attr_sample3r'r4r(r)�attr_sample2r!s  r�)test_integration_with_spec_att_definition�6TestSealable.test_integration_with_spec_att_definitionusr���I�I�l�#���������	�	�!���������+��������+�
�
�
�~�
.�
�N�N�/�
.�
.�s�
B"�"
B0c�D�[R"[5nSURl[R
"U5 UR
UR5S5 UR[5 UR5 SSS5 g!,(df   g=f)z<You need to define the methods, even if they are in the specr.N)
rrrr
r=r'r4r(r)rr!s  r�,test_integration_with_spec_method_definition�9TestSealable.test_integration_with_spec_method_definition�sh���I�I�l�#��()����%��	�	�!������)�)�+�Q�/�
�
�
�~�
.�
����/�
.�
.�s�7B�
Bc��[R"[5nUR[5 SUR
lSSS5 g!,(df   g=f)z)You cannot define methods out of the specr<N)rrrr(r)�method_sample3r=r!s  r�:test_integration_with_spec_method_definition_respects_spec�GTestSealable.test_integration_with_spec_method_definition_respects_spec�s8���I�I�l�#��
�
�
�~�
.�,-�A���)�/�
.�
.�s�A�
Ac��[R"5n[R"U5 UR[5nUR
 SSS5 UR
S[WR55 g!,(df   N4=f)N�SECRETE_name)	rrr'r(r)rj�assertIn�str�	exception�rr"�cms   r�(test_sealed_exception_has_attribute_name�5TestSealable.test_sealed_exception_has_attribute_name�sT���I�I�K���	�	�!��
�
�
�~�
.�"�
�N�N�/��
�
�n�c�"�,�,�&7�8�/�
.�s�
A<�<
B
c��[R"SS9nURRRR
 [R"U5 UR[5nURRRR
R SSS5 URS[WR55 g!,(df   N4=f)N�	mock_namerWz&mock_name.test1.test2.test3.test4.boom)
rrrLr r8rMr'r(r)�boomrkrlrmrns   r�"test_attribute_chain_is_maintained�/TestSealable.test_attribute_chain_is_maintained�s����I�I�;�'��	���
�
���!�!��	�	�!��
�
�
�~�
.�"�
�G�G�M�M���%�%�*�*�/��
�
�>��B�L�L�@Q�R�/�
.�s�*5C
�
Cc���[R"5nUR5RR	5R
 [R"U5 UR[5nUR5RR	5R5 SSS5 URS[WR55 g!,(df   N4=f)Nz mock.test1().test2.test3().test4)rrrLr r8rMr'r(r)rkrlrmrns   r�test_call_chain_is_maintained�*TestSealable.test_call_chain_is_maintained�s����I�I�K��	���	������%�%��	�	�!��
�
�
�~�
.�"�
�G�G�I�O�O�!�!�#�)�)�+�/��
�
�8�#�b�l�l�:K�L�/�
.�s�37C�
C&c�
�"SS5nSGH|nURUS9 [R"XS9nSURlSUR
Rl[R"U5 URUR[R5 URUR[R5 URUR[R5 URUR
[R5 URUR
R[R5 URUR
R[R5 URUR5[R5 URUR5S5 SURlURUR5S5 URUR
R
5S5 SUR
RlURUR
R
5S5 UR[ 5 UR5 SSS5 UR["5 S	UlSSS5 UR["5 UR5R& SSS5 S
URlURUR5S
5 UR["5 UR( SSS5 UR["5 S	UlSSS5 UR["5 UR+5 SSS5 UR[ 5 UR
R5 SSS5 UR["5 UR
R( SSS5 UR["5 S	UR
lSSS5 UR["5 UR
R+5 SSS5 SSS5 GM g!,(df   GN�=f!,(df   GN�=f!,(df   GN�=f!,(df   GNy=f!,(df   GNf=f!,(df   GNJ=f!,(df   GN$=f!,(df   GN=f!,(df   N�=f!,(df   N�=f!,(df   GMD=f)Nc�8�\rSrSrSrSrSr"SS5rSrg)	�1TestSealable.test_seal_with_autospec.<locals>.Foo�rc��grr	r
s r�bar1�6TestSealable.test_seal_with_autospec.<locals>.Foo.bar1����Drc��grr	r
s r�bar2�6TestSealable.test_seal_with_autospec.<locals>.Foo.bar2�r�rc��\rSrSrSrSrSrg)�5TestSealable.test_seal_with_autospec.<locals>.Foo.Baz�r<c��grr	r
s r�ban�9TestSealable.test_seal_with_autospec.<locals>.Foo.Baz.ban�s��trr	N)rrrr�bazr�rr	rr�Bazr��s
����#rr�r	N)	rrrr�foorr�r�rr	rr�Foor|�s���C� � �
$�
$rr�)TF)�spec_setrQ�b�new_a�new_br.r�)�subTestr�create_autospecrr=r�r�r'rr��NonCallableMagicMockrRr�r�r4r(�	TypeErrorr)�bar�x�missing_attr�missing_method)rr�r�r�s    r�test_seal_with_autospec�$TestSealable.test_seal_with_autospec�s@��	$�	$�&�H����x��0��*�*�3�B��(+����%�+.������(��	�	�#���%�%�c�g�g�t�/H�/H�I��%�%�c�h�h����?��%�%�c�h�h����?��%�%�c�g�g�t�~�~�>��%�%�c�g�g�k�k�4�3L�3L�M��%�%�c�g�g�k�k�4�>�>�B��%�%�c�h�h�j�$�.�.�A�� � �����S�1�(/����%�� � �����W�5�� � ��������4�+2������(�� � ��������8��&�&�y�1��G�G�I�2��&�&�~�6��C�G�7��&�&�~�6��H�H�J�L�L�7�)/����%�� � �����V�4��&�&�~�6��$�$�7��&�&�~�6�'(�C�$�7��&�&�~�6��&�&�(�7��&�&�y�1��G�G�K�K�M�2��&�&�~�6��G�G�(�(�7��&�&�~�6�+,�C�G�G�(�7��&�&�~�6��G�G�*�*�,�7�]1�0�&�22�1��6�6��6�6��7�6��6�6��6�6��1�1��6�6��6�6��6�6��]1�0�s��I*U�
R�U�8R!�U�R3�8AU�
S�U�0S�8U�S)�&U�S;�U�;T
�U�/T�U�T0�9U�
R�U�!
R0�+U�3
S�=U�
S�U�
S&�!U�)
S8�3U�;
T
�U�
T�U�
T-�)U�0
T>�:U�
U	r	N)rrrrr#r*r/r5r9r>rBrErHrNrSrZr`rcrgrprurxr�rr	rrrrsc��;���*��&�*��!�
�%�	 ��	�.�9�S�M�;-rr�__main__)�unittestrr�TestCaserr�mainr	rr�<module>r�sB����#�#�]-�8�$�$�]-�@�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit