File: //usr/local/CyberCP/lib/python3.10/site-packages/starlette/__pycache__/testclient.cpython-310.pyc
o
�hSm � @ s d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
mZ d dlm
Z
d dlmZmZ d dlZd dlZd dlZd dlmZ d dlmZ d dlmZmZmZmZmZ d d lmZ ej d
krrd dlm!Z! nd dl"m!Z! zd dl#Z#W n e$y� e%d��w ej&g ej'ej(j) f Z*ej&eegej+d f Z,ej&ege,f Z-ej&eeegej+d f Z.ej/e0ej1e0ej2e0 e3f f Z4d!dd�Z5G dd� d�Z6G dd� dej7�Z8G dd� de9�Z:G dd� de#j;e�Z<G dd� d�Z=G dd� de#j>�Z?G dd � d e#j@�ZAdS )"� )�annotationsN)�Future)�
GeneratorType)�unquote�urljoin)�StapledObjectStream)�is_async_callable)�ASGIApp�Message�Receive�Scope�Send)�WebSocketDisconnect)� �
)� TypeGuardzThe starlette.testclient module requires the httpx package to be installed.
You can install this with:
$ pip install httpx
�app�ASGI2App | ASGI3App�return�TypeGuard[ASGI3App]c C s t �| �r
t| d�S t| �S )N� __await__)�inspect�isclass�hasattrr �r � r �G/usr/local/CyberCP/lib/python3.10/site-packages/starlette/testclient.py� _is_asgi3/ s
r c @ s$ e Zd ZdZddd�Zddd�ZdS )�
_WrapASGI2z7
Provide an ASGI3 interface onto an ASGI2 app.
r �ASGI2Appr �Nonec C �
|| _ d S �Nr )�selfr r r r �__init__: �
z_WrapASGI2.__init__�scoper �receiver �sendr
c � s �| � |�}|||�I d H d S r"