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:/Python315/Lib/test/test_unittest/testmock/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_unittest/testmock/__pycache__/testsealable.cpython-315.opt-1.pyc
R
>lqj�c��]PHs]QHGsQQ2sQQ\O2s\Q6Xc\O2P!P!)�)�mockc�.`�\sQs]snQsQsQsUsP!)�SampleObjectc��P!�N���selfs&�=C:\Python315\\Lib\test\test_unittest\testmock\testsealable.py�method_sample1�SampleObject.method_sample1���d�c��P!rrrs&r
�method_sample2�SampleObject.method_sample2	r
rr)�__name__�
__module__�__qualname__�__firstlineno__rr�__static_attributes__�__classdictcell__��
__classdict__s@r
rrs����"�"�"rrc�`�\sQs]snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsUsP!)�TestSealablec�Z�[O2oUOUO[O2UOUO2[O2UOUO2O	2[O2P!r)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�j�[O2o[OU2UO[29^tt^2UO
PPP2UO[29^tt^2U2PPP2P!)%fhK?9h)%fhP!9hr�rr�seal�assertRaises�AttributeErrorrr!s& r
�.test_new_attributes_cannot_be_accessed_on_seal�;TestSealable.test_new_attributes_cannot_be_accessed_on_sealsf���I�I�K���	�	�!��
�
�
�~�
.�
.�
�F�F�/�
�
�
�~�
.�
.�
�C�/�
.�/�
.��
.�
.�
.�s$�

B�<B!�B	�B	�!B2	�*B2	c���[O2o[OU2UO[29^tt^2]UmPPP2P!)%fhP!9h��r&r!s& r
�)test_new_attributes_cannot_be_set_on_seal�6TestSealable.test_new_attributes_cannot_be_set_on_seals?���I�I�K���	�	�!��
�
�
�~�
.�
.��A�F�/�
.�
.�
.���
A�A-	�%A-	c���[O2o]UOm[OU2]UOmUOUOO]2P!r-)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��[O2o]UOm[OU2UO[29^tt^2]UOmPPP2P!)%fhP!9hr-)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-sN���I�I�K��������	�	�!��
�
�
�~�
.�
.��A�F�F�L�/�
.�
.�
.�s�A7�7B	�B	c��[O2o]UOm[OU2UOUO2]2P!)�)rrr�return_valuer'r3r!s& r
�+test_existing_attributes_allowed_after_seal�8TestSealable.test_existing_attributes_allowed_after_seal5s:���I�I�K��������	�	�!���������1�%rc��[O]Q5o[OU2UOUO]2P!)r.)�
test_value)rrr'r3r@r!s& r
�.test_initialized_attributes_allowed_after_seal�;TestSealable.test_initialized_attributes_allowed_after_seal=s/���I�I��#���	�	�!��������q�)rc���[O2o[OU2UO[29^tt^2U2PPP2P!)%fhP!9hr)rrr'r(r)r!s& r
�test_call_on_sealed_mock_fails�+TestSealable.test_call_on_sealed_mock_failsCs=���I�I�K���	�	�!��
�
�
�~�
.�
.�
�C�/�
.�
.�
.�r1c��[O]Q5o[OU2UOU2]2P!)�)r<)rrr'r3r!s& r
�)test_call_on_defined_sealed_mock_succeeds�6TestSealable.test_call_on_defined_sealed_mock_succeedsJs-���I�I�1�%���	�	�!�������a� rc�^�[O2o]UOO2m[O
U2UO
UOO2O]2UO[29^tt^2UOO2OPPP2UO[29^tt^2UOOPPP2P!)%fhKN9h)%fhP!9h)�)
rr�test1r r7r'r3r(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$�%D�'D�D	�D	�D,	�$D,	c�D�[O2o]UOOQ*m]UOOQ*m[O
U2UO
UOOQ*O]2UO
UOOQ*O]2UO[29^tt^2UOOQ*OPPP2UO[29^tt^2UOOQ*OPPP2P!)%fhK_9h)%fhP!9h)rK�a:�rGN)
r�	MagicMockrLr r7r'r3r(r)rMr!s& r
�#test_seals_recurse_on_magic_methods�0TestSealable.test_seals_recurse_on_magic_methods\s����N�N���#$����
�
�c�� �#$����
�
�c�� ��	�	�!����������s�+�1�1�1�5���������s�+�1�1�1�5�
�
�
�~�
.�
.�
�G�G�M�M�#��$�$�/�
�
�
�~�
.�
.�
�G�G�M�M�#��$�$�/�
.�/�
.��
.�
.�
.�s$�<(E;�	(F�;F	�F	�F	�F	c��[OQQ5o[OQQ5UOm]UOOm[O
U2UO
UOOO]2UOOO]UOOmP!)�	root_mock��name�
not_sealed)rrrLr r7r'r3rMr!s& r
�,test_seals_dont_recurse_on_manual_attributes�9TestSealable.test_seals_dont_recurse_on_manual_attributesjs~���I�I�;�'���	�	�|�4����
�����
�
���	�	�!����������,�,�a�0�	���
�
�������
�
�rc��[O[2o]Um]Um[O
U2UO
UO]2UO
UO]2UO[29^tt^2UOPPP2P!)%fhP!9h)z0You are not restricted when using mock with spec)
rrr�attr_sample1�attr_sample3r'r3r(r)�attr_sample2r!s& r
�)test_integration_with_spec_att_definition�6TestSealable.test_integration_with_spec_att_definitionusx���I�I�l�#���������	�	�!���������+��������+�
�
�
�~�
.�
.�
�N�N�/�
.�
.�
.�s�
B,�,B=	�5B=	c�^�[O[2o]UOm[O
U2UO
UO2]2UO[29^tt^2UO2PPP2P!)%fhP!9h)z<You need to define the methods, even if they are in the spec)
rrrrr<r'r3r(r)rr!s& r
�,test_integration_with_spec_method_definition�9TestSealable.test_integration_with_spec_method_definition�sn���I�I�l�#��()����%��	�	�!������)�)�+�Q�/�
�
�
�~�
.�
.�
����/�
.�
.�
.�s�B�B,	�$B,	c���[O[2oUO[29^tt^2]UO
mPPP2P!)%fhP!9h)z)You cannot define methods out of the spec)rrrr(r)�method_sample3r<r!s& r
�:test_integration_with_spec_method_definition_respects_spec�GTestSealable.test_integration_with_spec_method_definition_respects_spec�s>���I�I�l�#��
�
�
�~�
.�
.�,-�A���)�/�
.�
.�
.�s�A�A&	�A&	c�2�[O2o[OU2UO[29^tt^2oUO
PPP2UO
Q[WO22P!)%fhK79h)N�SECRETE_name)	rrr'r(r)rk�assertIn�str�	exception�r	r"�cms&  r
�(test_sealed_exception_has_attribute_name�5TestSealable.test_sealed_exception_has_attribute_name�sW���I�I�K���	�	�!��
�
�
�~�
.�
.�"�
�N�N�/��
�
�n�c�"�,�,�&7�8�/�
.�s�

B�B	�B	c���[OQQ5oUOOOO
[OU2UO[29^tt^2oUOOOO
OPPP2UOQ[WO22P!)%fhK79h)�	mock_namerXz&mock_name.test1.test2.test3.test4.boom)
rrrLr r7rMr'r(r)�boomrlrmrnros&  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�65C�C*	�#C*	c���[O2oUO2OO	2O
[OU2UO[29^tt^2oUO2OO	2O2PPP2UOQ[WO22P!)%fhK79h)Nz mock.test1().test2.test3().test4)rrrLr r7rMr'r(r)rlrmrnros&  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�<7C"�"C2	�+C2	c��QQ2oQFCD�oUOUQ59^tt^2[OVQ5oQUOmQUO
Om[OU2UOUO[O2UOUO[O2UOUO[O2UOUO
[O2UOUO
O[O2UOUO
O[O2UOUO2[O2UOUO2Q2QUOmUOUO2Q2UOUO
O
2Q2QUO
OmUOUO
O
2Q2UO[ 29^tt^2UO2PPP2UO["29^tt^2]UmPPP2UO["29^tt^2UO2O&PPP2QUOmUOUO2Q2UO["29^tt^2UO(PPP2UO["29^tt^2]UmPPP2UO["29^tt^2UO+2PPP2UO[ 29^tt^2UO
O2PPP2UO["29^tt^2UO
O(PPP2UO["29^tt^2]UO
mPPP2UO["29^tt^2UO
O+2PPP2PPP2CJ�	P!)%fhCKF9h)%fhCK-9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCKw9h)%fhCKK9h)%fhCK#9h)%fhCK9h)%fhK�9h)%fhCJ�9h)	c�F`�\sQs]�sn]sQsQsQQ2sQsUs	P!)�1TestSealable.test_seal_with_autospec.<locals>.Fooc��P!rrrs&r
�bar1�6TestSealable.test_seal_with_autospec.<locals>.Foo.bar1����Drc��P!rrrs&r
�bar2�6TestSealable.test_seal_with_autospec.<locals>.Foo.bar2�r�rc�,`�\sQs]�sn]sQsQsUsP!)�5TestSealable.test_seal_with_autospec.<locals>.Foo.Bazc��P!rrrs&r
�ban�9TestSealable.test_seal_with_autospec.<locals>.Foo.Baz.ban�s��trr)rrrr�bazr�rrrs@r
�Bazr��s������#�#rr�r)
rrrr�foorr�r�rrrs@r
�Foor}�s�����C� � �
$�
$rr�)�spec_setrQ�b�new_a�new_br�)TF)�subTestr�create_autospecrr<r�r�r'rr��NonCallableMagicMockrSr�r�r3r(�	TypeErrorr)�bar�x�missing_attr�missing_method)r	r�r�r�s&   r
�test_seal_with_autospec�$TestSealable.test_seal_with_autospec�s��	$�	$�&�H����x��0�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�1��G�G�I�2��&�&�~�6�6��C�G�7��&�&�~�6�6��H�H�J�L�L�7�)/����%�� � �����V�4��&�&�~�6�6��$�$�7��&�&�~�6�6�'(�C�$�7��&�&�~�6�6��&�&�(�7��&�&�y�1�1��G�G�K�K�M�2��&�&�~�6�6��G�G�(�(�7��&�&�~�6�6�+,�C�G�G�(�7��&�&�~�6�6��G�G�*�*�,�7�]1�0�&�22�1�1��6�6�6��6�6�6��7�6�6��6�6�6��6�6�6��1�1�1��6�6�6��6�6�6��6�6��]1�0�0�s?�I5V7	�"S0
�3%V7	�T
� %V7	�T
� AV7	�6
T,
�%V7	�(U
�0%V7	�U
�&%V7	�U(
�&%V7	�U<
�"%V7	�V
�%V7	�>V$
�V7	�0T�9T�;	V7	�T�
T�	V7	�T)�!T)�#	V7	�,T=�5T=�7	V7	�U�	U�	V7	�U%�U%�	V7	�(U9�1U9�3	V7	�<V
�V
�	V7	�V!�V!�	V7	�$V4�-V4�/V7	�7W	
�W	
r)rrrrr#r*r/r4r8r=rArDrHrNrTr[rardrhrqrvryr�rrrs@r
rrsk����;���*��&�*��!�
�%�	 ��	�.�9�S�M�;-�;-rr�__main__)�unittestrr�TestCaserr�mainrrr
�<module>r�sB����#�#�]-�8�$�$�]-�@�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit