Files
serveur-d-authentification/venv/lib/python3.10/site-packages/asgiref/__pycache__/testing.cpython-310.pyc

49 lines
3.8 KiB
Plaintext
Raw Normal View History

o
<00>Q<EFBFBD>jE<00>@sBddlZddlZddlZddlmZddlmZGdd<06>d<06>ZdS)<07>N<>)<01>guarantee_single_callable)<01>timeoutc@steZdZdZdd<03>Zedd<05><00>Zedd<07><00>Zedd <09><00>Zdd d <0C>Z ddd<0F>Z
dd<11>Z dd<13>Z ddd<15>Z ddd<19>ZdS)<1E>ApplicationCommunicatorz}
Runs an ASGI application in a test mode, allowing sending of
messages to it and retrieval of messages it sends.
cCs&d|_t|<01>|_||_d|_d|_dS<00>N)<06>_futurer<00> application<6F>scope<70> _input_queue<75> _output_queue)<03>selfrr <00>r <00>r/home/sorel/systeme_gestion_cerfig/serveur-d-authentification/venv/lib/python3.10/site-packages/asgiref/testing.py<70>__init__s


z ApplicationCommunicator.__init__cC<00>|jdur
t<01><02>|_|jSr)r
<00>asyncio<69>Queue<75>r r r r<00> input_queue<00>

z#ApplicationCommunicator.input_queuecCrr)r rrrr r r<00> output_queuerz$ApplicationCommunicator.output_queuecCs8|jdurt<01><02><00>tj|<00>|j|jj |j
j <0B><03>|_|jSr) r<00> contextvars<72>Context<78>runr<00> create_taskrr r<00>getr<00>putrr r r<00>future$s
<02><06>zApplicationCommunicator.futurerc<00>s<><00>zXt|<01>4IdH<00>#z |jIdH|j<01><02>Wn
tjy"YnwWd<00>IdHn 1IdHs3wYW|j<01><05>sX|j<01><06>z |jIdHWdStjyWYdSwdS|j<01><05>sw|j<01><06>z|jIdHWwtjyvYwww)zV
Waits for the application to stop itself and returns any exceptions.
N)<07> async_timeoutr<00>resultr<00>CancelledError<6F>done<6E>cancel)r rr r r<00>wait3s6<02> <02><02>(<28><02>

<02><0E>
<02><02>zApplicationCommunicator.waitTcCs:|j}|dur dS|<02><01>s|<02><02>dS|r|<02><03>dSdSr)rr!r"r)r <00>
exceptionsrr r r<00>stopFs  <04>zApplicationCommunicator.stopcCs(z |jdd<02>WdStyYdSw)NF)r$)r%<00> RuntimeErrorrr r r<00>__del__Qs
 <02>zApplicationCommunicator.__del__c<00>s,<00>|j<00><01>r |j<00><02>|j<03>|<01>IdHdS)z;
Sends a single message to the application
N)rr!rrr)r <00>messager r r<00>
send_inputYs<02>

z"ApplicationCommunicator.send_inputc <00>s<><00>|j<00><01>r |j<00><02>z*t|<01>4IdH<00>|j<04><05>IdHWd<00>IdHWS1IdHs.wYWdStjyh}z&|j<00><01>rJ|j<00><02>|<02>|j<00><08>z |jIdHW|<02>tj ycY|<02>wd}~ww)zX
Receives a single message from the application, with optional timeout.
N)
rr!rrrrr<00> TimeoutErrorr"r )r r<00>er r r<00>receive_outputds*<02>

4<>


<EFBFBD><0E><02><08><02>z&ApplicationCommunicator.receive_output皙<74><E79A99><EFBFBD><EFBFBD><EFBFBD>?<3F>{<14>G<EFBFBD>z<EFBFBD>?c<00>sf<00>|j<00><01>r |j<00><02>t<03><04>}t<03><04>||kr.|j<05><06>sdSt<07>|<02>IdHt<03><04>||ks|j<05><06>S)zO
Checks that there is no message to receive in the given time.
FN) rr!r<00>time<6D> monotonicr<00>emptyr<00>sleep)r r<00>interval<61>startr r r<00>receive_nothing{s<02>


<10>
z'ApplicationCommunicator.receive_nothingN)r)T)r-r.)<0F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r<00>propertyrrrr#r%r'r)r,r5r r r rr s




 
r)rrr/<00> compatibilityrrrrr r r r<00><module>s