§
    Ìtºfº@  ã                   ó¨  — d dl mZ d dlZ ej        ¦   «          d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ d d	lmZ d d
lmZmZmZ d dlmZ 	 d dlmZ n# e$ r	 d dlmZ Y nw xY wd dlmZ  G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        Z  G d„ dej        ¦  «        Z!dS )é    )ÚMockN)Úwildcards2patterns)ÚWebSocketServerFactory)ÚWebSocketServerProtocol)ÚWebSocketClientProtocol)ÚTransportDetails©ÚConnectingRequest)ÚFailure)ÚConnectionDoneÚConnectionAbortedÚConnectionLost)Úunittest)ÚStringTransport)ÚFakeTransportc                   ó6   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	dS )	ÚExceptionHandlingTestsz^
    Tests that we format various exception variations properly during
    connectionLost
    c                 ó¤   — t          ¦   «         | _        t          ¦   «         | _        | j        | j        _        t	          ¦   «         | j        _        d S ©N)r   Úfactoryr   Úprotor   Úlog©Úselfs    úe/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/autobahn/twisted/test/test_tx_protocol.pyÚsetUpzExceptionHandlingTests.setUp7   s9   € Ý-Ñ/Ô/ˆŒÝ,Ñ.Ô.ˆŒ
Ø!œ\ˆŒ
ÔÝ™œˆŒ
Œˆˆó    c                 ó”   — | j         j        | j         j        | j         j        | j         j        fD ]}|�|                     ¦   «          Œd S r   ©r   ÚautoPingPendingCallÚautoPingTimeoutCallÚopenHandshakeTimeoutCallÚcloseHandshakeTimeoutCallÚcancel©r   Úcalls     r   ÚtearDownzExceptionHandlingTests.tearDown=   óS   € à”
Ô.Ø”
Ô.Ø”
Ô3Ø”
Ô4ð	
ð 	ð 	ˆDð ÐØ—’‘”�øð	ð 	r   c                 ó(  — | j                              ¦   «          | j                              t          t	          ¦   «         ¦  «        ¦  «         d                     d„ | j         j        j        D ¦   «         ¦  «        }|                      d|v ¦  «         d S )Nú c                 ó8   — g | ]}t          |d          ¦  «        ‘ŒS ©é   ©Ústr©Ú.0Úxs     r   ú
<listcomp>z?ExceptionHandlingTests.test_connection_done.<locals>.<listcomp>M   ó"   € ÐJÐJÐJ¨1�S  1¤™YœYÐJÐJÐJr   zclosed cleanly)	r   Ú_connectionMadeÚconnectionLostr   r   Újoinr   Ú
mock_callsÚ
assertTrue©r   Úmessagess     r   Útest_connection_donez+ExceptionHandlingTests.test_connection_doneG   s   € àŒ
×"Ò"Ñ$Ô$Ð$àŒ
×!Ò!¥'­.Ñ*:Ô*:Ñ";Ô";Ñ<Ô<Ð<à—8’8ÐJÐJ°´
´Ô0IÐJÑJÔJÑKÔKˆØ�ŠÐ(¨HÐ4Ñ5Ô5Ð5Ð5Ð5r   c                 ó(  — | j                              ¦   «          | j                              t          t	          ¦   «         ¦  «        ¦  «         d                     d„ | j         j        j        D ¦   «         ¦  «        }|                      d|v ¦  «         d S )Nr*   c                 ó8   — g | ]}t          |d          ¦  «        ‘ŒS r,   r.   r0   s     r   r3   zBExceptionHandlingTests.test_connection_aborted.<locals>.<listcomp>V   r4   r   z	 aborted )	r   r5   r6   r   r   r7   r   r8   r9   r:   s     r   Útest_connection_abortedz.ExceptionHandlingTests.test_connection_abortedP   s   € àŒ
×"Ò"Ñ$Ô$Ð$àŒ
×!Ò!¥'Õ*;Ñ*=Ô*=Ñ">Ô">Ñ?Ô?Ð?à—8’8ÐJÐJ°´
´Ô0IÐJÑJÔJÑKÔKˆØ�Š˜ xÐ/Ñ0Ô0Ð0Ð0Ð0r   c                 ó(  — | j                              ¦   «          | j                              t          t	          ¦   «         ¦  «        ¦  «         d                     d„ | j         j        j        D ¦   «         ¦  «        }|                      d|v ¦  «         d S )Nr*   c                 ó8   — g | ]}t          |d          ¦  «        ‘ŒS r,   r.   r0   s     r   r3   z?ExceptionHandlingTests.test_connection_lost.<locals>.<listcomp>_   r4   r   ú
 was lost ©	r   r5   r6   r   r   r7   r   r8   r9   r:   s     r   Útest_connection_lostz+ExceptionHandlingTests.test_connection_lostY   s~   € àŒ
×"Ò"Ñ$Ô$Ð$àŒ
×!Ò!¥'­.Ñ*:Ô*:Ñ";Ô";Ñ<Ô<Ð<à—8’8ÐJÐJ°´
´Ô0IÐJÑJÔJÑKÔKˆØ�Š˜¨Ð0Ñ1Ô1Ð1Ð1Ð1r   c                 óX  — | j                              ¦   «          | j                              t          t	          d¦  «        ¦  «        ¦  «         d                     d„ | j         j        j        D ¦   «         ¦  «        }|                      d|v ¦  «         |                      d|v ¦  «         d S )NÚ	greetingsr*   c                 ód   — g | ]-}t          |d          ¦  «        t          |d         ¦  «        z   ‘Œ.S )r-   é   r.   r0   s     r   r3   zCExceptionHandlingTests.test_connection_lost_arg.<locals>.<listcomp>h   s1   € ÐVÐVÐV°q�S  1¤™YœY­¨Q¨q¬T©¬Ñ2ÐVÐVÐVr   rB   rC   r:   s     r   Útest_connection_lost_argz/ExceptionHandlingTests.test_connection_lost_argb   s—   € àŒ
×"Ò"Ñ$Ô$Ð$àŒ
×!Ò!¥'­.¸Ñ*EÔ*EÑ"FÔ"FÑGÔGÐGà—8’8ÐVÐV¸D¼J¼NÔ<UÐVÑVÔVÑWÔWˆØ�Š˜¨Ð0Ñ1Ô1Ð1Ø�Š˜ xÐ/Ñ0Ô0Ð0Ð0Ð0r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r'   r<   r?   rD   rI   © r   r   r   r   1   sx   € € € € € ðð ð
 ð  ð  ðð ð ð6ð 6ð 6ð1ð 1ð 1ð2ð 2ð 2ð1ð 1ð 1ð 1ð 1r   r   c                   ó   — e Zd ZdZd„ ZdS )ÚHixie76RejectionTestsz@
    Hixie-76 should not be accepted by an Autobahn server.
    c                 óR  — t          ¦   «         }t          ¦   «         }t          ¦   «         }||_        ||_        d}d|_        |                     ¦   «          ||_        |                     ¦   «          |  	                    d|j
        ¦  «         |  	                    d|j
        ¦  «         dS )zO
        A handshake from a client only supporting Hixie-76 will fail.
        sè   GET /demo HTTP/1.1
Host: example.com
Connection: Upgrade
Sec-WebSocket-Key2: 12998 5 Y3 1  .P00
Sec-WebSocket-Protocol: sample
Upgrade: WebSocket
Sec-WebSocket-Key1: 4 @1  46546xW%0l 1 5
Origin: http://example.com

^n:ds[4Ur   s   HTTP/1.1 400s   Hixie76 protocol not supportedN)r   r   r   r   Ú	transportÚopenHandshakeTimeoutr5   ÚdataÚprocessHandshakeÚassertInÚ_written)r   ÚtÚfÚpÚhttp_requests        r   Útest_handshake_failsz*Hixie76RejectionTests.test_handshake_failsq   sŸ   € õ ‰OŒOˆÝ"Ñ$Ô$ˆÝ#Ñ%Ô%ˆØˆŒ	ØˆŒð Uˆà!"ˆÔØ	×ÒÑÔÐØˆŒØ	×ÒÑÔÐØ�Š�o q¤zÑ2Ô2Ð2Ø�ŠÐ7¸¼ÑDÔDÐDÐDÐDr   N)rJ   rK   rL   rM   r\   rN   r   r   rP   rP   m   s2   € € € € € ðð ðEð Eð Eð Eð Er   rP   c                   óZ   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ ZdS )ÚWebSocketOriginMatchingzD
    Test that we match Origin: headers properly, when asked to
    c                 ó@  — t          ¦   «         | _        | j                             ddg¬¦  «         t          ¦   «         | _        t          ¦   «         | j        _        | j        | j        _        t          ¦   «         | j        _        | j         	                    ¦   «          d S )Nz127.0.0.1:*z*.example.com:*©ÚallowedOrigins©
r   r   ÚsetProtocolOptionsr   r   r   rR   r   ÚfailHandshaker5   r   s    r   r   zWebSocketOriginMatching.setUp‹   sŠ   € Ý-Ñ/Ô/ˆŒØŒ×'Ò'Ø)Ð+<Ð=ð 	(ñ 	
ô 	
ð 	
õ -Ñ.Ô.ˆŒ
Ý.Ñ0Ô0ˆŒ
ÔØ!œ\ˆŒ
ÔÝ#'¡6¤6ˆŒ
Ô ØŒ
×"Ò"Ñ$Ô$Ð$Ð$Ð$r   c                 ó”   — | j         j        | j         j        | j         j        | j         j        fD ]}|�|                     ¦   «          Œd S r   r   r%   s     r   r'   z WebSocketOriginMatching.tearDown–   r(   r   c                 ó8  — d                      g d¢¦  «        | j        _        | j                             ¦   «          |                      | j        j        j        d¦  «         | j        j        j        d         d         d         }|                      d|v ¦  «         d S )Nó   
)	ó   GET /ws HTTP/1.1ó   Host: www.example.comó   Sec-WebSocket-Version: 13s,   Origin: http://www.example.com.malicious.comó,   Sec-WebSocket-Extensions: permessage-deflateó+   Sec-WebSocket-Key: tXAxWFUqnhi86Ajj7dRY5g==ó   Connection: keep-alive, Upgradeó   Upgrade: websocketrg   úHandshake should have failedr   r-   únot allowed)r7   r   rT   ÚconsumeDatar9   rd   Úcalledr8   ©r   Úargs     r   Útest_match_full_originz.WebSocketOriginMatching.test_match_full_origin    s”   € Ø!Ÿ,š,ð 
(
ð 
(
ð 
(
ñ 
ô 
ˆŒ
Œð 	Œ
×ÒÑ Ô Ð à�Š˜œ
Ô0Ô7Ð9WÑXÔXÐXØŒjÔ&Ô1°!Ô4°QÔ7¸Ô:ˆØ�Š˜¨Ð,Ñ-Ô-Ð-Ð-Ð-r   c                 óà  — | j                              dg¬¦  «         | j         j        | j        _        | j         j        | j        _        d| j         _        d                     g d¢¦  «        | j        _        | j                             ¦   «          |  	                    | j        j
        j        d¦  «         | j        j
        j        d         d         d         }|  	                    d	|v ¦  «         d S )
Nzhttp://*.example.com:*r`   Frg   ©	rh   ri   rj   s   Origin: https://www.example.comrk   rl   rm   rn   rg   ro   r   r-   rp   )r   rc   ÚallowedOriginsPatternsr   ra   ÚisSecurer7   rT   rq   r9   rd   rr   r8   rs   s     r   Útest_match_wrong_scheme_originz6WebSocketOriginMatching.test_match_wrong_scheme_origin²   sç   € ð 	Œ×'Ò'Ø4Ð5ð 	(ñ 	
ô 	
ð 	
ð -1¬LÔ,OˆŒ
Ô)Ø$(¤LÔ$?ˆŒ
Ô!ð !&ˆŒÔØ!Ÿ,š,ð 
(
ð 
(
ð 
(
ñ 
ô 
ˆŒ
Œð 	Œ
×ÒÑ Ô Ð à�Š˜œ
Ô0Ô7Ð9WÑXÔXÐXØŒjÔ&Ô1°!Ô4°QÔ7¸Ô:ˆØ�Š˜¨Ð,Ñ-Ô-Ð-Ð-Ð-r   c                 óô   — d| j         _        d| j         _        d                     g d¢¦  «        | j        _        | j                             ¦   «          |                      | j        j        j	        d¦  «         d S )NTé»  rg   rw   úHandshake should have succeeded)
r   ry   Úportr7   r   rT   rq   ÚassertFalserd   rr   r   s    r   Útest_match_origin_secure_schemez7WebSocketOriginMatching.test_match_origin_secure_schemeÎ   sw   € Ø $ˆŒÔØˆŒÔØ!Ÿ,š,ð 
(
ð 
(
ð 
(
ñ 
ô 
ˆŒ
Œð 	Œ
×ÒÑ Ô Ð à×Ò˜œÔ1Ô8Ð:[Ñ\Ô\Ð\Ð\Ð\r   c                 ó,  — | j                              dg¬¦  «         d| j         _        d| j         _        d                     g d¢¦  «        | j        _        | j                             ¦   «          |                      | j        j	        j
        d¦  «         dS )	z1
        Test the examples from the docs
        z*://*.example.com:*r`   Tr|   rg   )	rh   ri   rj   ó   Origin: http://www.example.comrk   rl   rm   rn   rg   r}   N)r   rc   ry   r~   r7   r   rT   rq   r   rd   rr   r   s    r   Ú'test_match_origin_documentation_examplez?WebSocketOriginMatching.test_match_origin_documentation_exampleà   s    € ð 	Œ×'Ò'Ø1Ð2ð 	(ñ 	
ô 	
ð 	
ð !%ˆŒÔØˆŒÔØ!Ÿ,š,ð 
(
ð 
(
ð 
(
ñ 
ô 
ˆŒ
Œð 	Œ
×ÒÑ Ô Ð à×Ò˜œÔ1Ô8Ð:[Ñ\Ô\Ð\Ð\Ð\r   c           	      ó–   — ddl m}m} t          dg¦  «        }dD ]-}|                       | ||¦  «        dd|¦  «        |¦  «         Œ.dS )z>
        All the example origins from RFC6454 (3.2.1)
        r   ©Ú_is_same_originÚ_url_to_originz*example.com:*)zhttp://example.com/zhttp://example.com:80/zhttp://example.com/path/filezhttp://example.com/;semi=truez//example.com/zhttp://@example.comÚhttpéP   N)Úautobahn.websocket.protocolr†   r‡   r   r9   ©r   r†   r‡   ÚpolicyÚurls        r   Útest_match_origin_examplesz2WebSocketOriginMatching.test_match_origin_examplesø   s�   € ð
 	PÐOÐOÐOÐOÐOÐOÐOÝ#Ð%5Ð$6Ñ7Ô7ˆð+ð 	[ð 	[ˆCð �OŠO˜O˜O¨N¨N¸3Ñ,?Ô,?ÀÈÈVÑTÔTÐVYÑZÔZÐZÐZð	[ð 	[r   c           	      ó”   — ddl m}m} t          dg¦  «        }dD ],}|                       | ||¦  «        dd|¦  «        ¦  «         Œ-dS )zI
        All the example 'not-same' origins from RFC6454 (3.2.1)
        r   r…   úexample.com)zhttp://ietf.org/zhttp://example.org/zhttps://example.com/zhttp://example.com:8080/zhttp://www.example.com/rˆ   r‰   N)rŠ   r†   r‡   r   r   r‹   s        r   Ú"test_match_origin_counter_examplesz:WebSocketOriginMatching.test_match_origin_counter_examples	  s~   € ð
 	PÐOÐOÐOÐOÐOÐOÐOÝ# ] OÑ4Ô4ˆð/ð 	Wð 	WˆCð ×Ò˜_˜_¨^¨^¸CÑ-@Ô-@À&È"ÈfÑUÔUÑVÔVÐVÐVð	Wð 	Wr   c                 ó2  — ddl m}m} t          dg¦  «        }|                       | |d¦  «        dd|¦  «        ¦  «         |                       | |d¦  «        dd|¦  «        ¦  «         |                       | |d	¦  «        dd|¦  «        ¦  «         d S )
Nr   r…   zhttp://*example.com:80zhttp://example.com:80rˆ   r‰   zhttp://example.com:81éQ   zhttps://example.com:80)rŠ   r†   r‡   r   r9   r   )r   r†   r‡   rŒ   s       r   Útest_match_origin_edgez.WebSocketOriginMatching.test_match_origin_edge  sÜ   € àOÐOÐOÐOÐOÐOÐOÐOÝ#Ð%=Ð$>Ñ?Ô?ˆà�ŠØˆO˜N˜NÐ+BÑCÔCÀVÈRÐQWÑXÔXñ	
ô 	
ð 	
ð 	×ÒØˆO˜N˜NÐ+BÑCÔCÀVÈRÐQWÑXÔXñ	
ô 	
ð 	
ð 	×ÒØˆO˜N˜NÐ+CÑDÔDÀfÈbÐRXÑYÔYñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óŽ   — ddl m} |                       |d¦  «        d¦  «         |                       |d¦  «        d¦  «         d S )Nr   ©r‡   zhttp://example.com)rˆ   r�   r‰   zhTTp://example.com©rŠ   r‡   ÚassertEqual©r   r‡   s     r   Útest_origin_from_urlz,WebSocketOriginMatching.test_origin_from_url%  st   € Ø>Ð>Ð>Ð>Ð>Ð>ð 	×ÒØˆNÐ/Ñ0Ô0Ø'ñ	
ô 	
ð 	
ð
 	×ÒØˆNÐ/Ñ0Ô0Ø'ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óP   — ddl m} |                      d |d¦  «        ¦  «         d S )Nr   r–   Únullzfile:///etc/passwdr—   r™   s     r   Útest_origin_filez(WebSocketOriginMatching.test_origin_file3  s;   € Ø>Ð>Ð>Ð>Ð>Ð>Ø×Ò˜  Ð0DÑ!EÔ!EÑFÔFÐFÐFÐFr   c                 ó¤  — ddl m}m} |                      d |d¦  «        ¦  «         |                       | |d¦  «        ddg ¦  «        ¦  «         |                       | |d¦  «        ddg ¦  «        ¦  «         |                       | |d¦  «        ddg ¦  «        ¦  «         |                       | |d¦  «        d dg ¦  «        ¦  «         d S )Nr   r…   rœ   rˆ   r‰   ÚhttpsÚ )rŠ   r†   r‡   r˜   r   )r   r†   r‡   s      r   Útest_origin_nullz(WebSocketOriginMatching.test_origin_null7  s  € ØOÐOÐOÐOÐOÐOÐOÐOØ×Ò˜  °Ñ!7Ô!7Ñ8Ô8Ð8Ø×ÒØˆO˜N˜N¨6Ñ2Ô2°F¸BÀÑCÔCñ	
ô 	
ð 	
ð 	×ÒØˆO˜N˜N¨6Ñ2Ô2°G¸RÀÑDÔDñ	
ô 	
ð 	
ð 	×ÒØˆO˜N˜N¨6Ñ2Ô2°B¸¸BÑ?Ô?ñ	
ô 	
ð 	
ð 	×ÒØˆO˜N˜N¨6Ñ2Ô2°D¸"¸bÑAÔAñ	
ô 	
ð 	
ð 	
ð 	
r   N)rJ   rK   rL   rM   r   r'   ru   rz   r€   rƒ   rŽ   r‘   r”   rš   r�   r¡   rN   r   r   r^   r^   †   sá   € € € € € ðð ð	%ð 	%ð 	%ðð ð ð.ð .ð .ð$.ð .ð .ð8]ð ]ð ]ð$]ð ]ð ]ð0[ð [ð [ð"Wð Wð Wð
ð 
ð 
ð
ð 
ð 
ðGð Gð Gð
ð 
ð 
ð 
ð 
r   r^   c                   ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )ÚWebSocketXForwardedForzR
    Test that (only) a trusted X-Forwarded-For can replace the peer address.
    c                 ó<  — t          ¦   «         | _        | j                             d¬¦  «         t          ¦   «         | _        t          ¦   «         | j        _        | j        | j        _        t          ¦   «         | j        _        | j         	                    ¦   «          d S )NrH   )ÚtrustXForwardedForrb   r   s    r   r   zWebSocketXForwardedFor.setUpM  s„   € Ý-Ñ/Ô/ˆŒØŒ×'Ò'Ø ð 	(ñ 	
ô 	
ð 	
õ -Ñ.Ô.ˆŒ
Ý.Ñ0Ô0ˆŒ
ÔØ!œ\ˆŒ
ÔÝ#'¡6¤6ˆŒ
Ô ØŒ
×"Ò"Ñ$Ô$Ð$Ð$Ð$r   c                 ó”   — | j         j        | j         j        | j         j        | j         j        fD ]}|�|                     ¦   «          Œd S r   r   r%   s     r   r'   zWebSocketXForwardedFor.tearDownX  r(   r   c                 ó¼   — d                      g d¢¦  «        | j        _        | j                             ¦   «          |                      | j        j        dd¦  «         d S )Nrg   )
rh   ri   r‚   rj   rk   rl   rm   rn   s0   X-Forwarded-For: 1.2.3.4, 2.3.4.5, 111.222.33.44rg   z2.3.4.5zQThe second address in X-Forwarded-For should have been picked as the peer address)r7   r   rT   rq   ÚassertEqualsÚpeerr   s    r   Útest_trusted_addressesz-WebSocketXForwardedFor.test_trusted_addressesb  sq   € Ø!Ÿ,š,ð (
ð (
ð (
ñ ô ˆŒ
Œð 	Œ
×ÒÑ Ô Ð à×ÒØŒJŒO˜YØ_ñ	aô 	að 	að 	að 	ar   N)rJ   rK   rL   rM   r   r'   rª   rN   r   r   r£   r£   H  sP   € € € € € ðð ð	%ð 	%ð 	%ðð ð ðað að að að ar   r£   c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚOnConnectingTestsz¾
    Tests related to onConnecting callback

    These tests are testing generic behavior, but are somewhat tied to
    'a framework' so we're just testing using Twisted-specifics here.
    c                 óê  ‡— dŠ G ˆfd„dt           ¦  «        } |¦   «         }t          ¦   «         |_        |                     ¦   «         }|                      |¦  «         |                      t          |j        j        ¦  «        dk    ¦  «         d}t          t          |j        j        ¦  «        ¦  «        D ]%}‰t          |j        j        |         ¦  «        v rd}Œ&|                      |d¦  «         d S )Nz	bad stuffc                   ó6   •— e Zd ZdZdZ e¦   «         Zˆ fd„ZdS )úDOnConnectingTests.test_on_connecting_client_fails.<locals>.TestProtoNTc                 ó"   •— t          ‰¦  «        ‚r   )ÚRuntimeError)r   Útransport_detailsÚ	MAGIC_STRs     €r   ÚonConnectingzQOnConnectingTests.test_on_connecting_client_fails.<locals>.TestProto.onConnecting‡  s   ø€ Ý" 9Ñ-Ô-Ð-r   )rJ   rK   rL   ÚstateÚwasCleanr   r   r´   )r³   s   €r   Ú	TestProtor¯   ‚  sC   ø€ € € € € ØˆEØˆHØ�$‘&”&ˆCð.ð .ð .ð .ð .ð .ð .r   r·   r   FTz!MAGIC_STR not found when expected)r   r   rR   ÚstartHandshakeÚsuccessResultOfr9   Úlenr   r8   Úranger/   )r   r·   r   ÚdÚmagic_foundÚir³   s         @r   Útest_on_connecting_client_failsz1OnConnectingTests.test_on_connecting_client_fails~  s  ø€ àˆ	ð	.ð 	.ð 	.ð 	.ð 	.ð 	.ð 	.Õ/ñ 	.ô 	.ð 	.ð �	‘”ˆÝ'™/œ/ˆŒØ× Ò Ñ"Ô"ˆØ×Ò˜QÑÔÐà�Š�˜EœIÔ0Ñ1Ô1°AÒ5Ñ6Ô6Ð6ØˆÝ•s˜5œ9Ô/Ñ0Ô0Ñ1Ô1ð 	#ð 	#ˆAØ�C ¤	Ô 4°QÔ 7Ñ8Ô8Ð8Ð8Ø"�øØ�Š˜Ð%HÑIÔIÐIÐIÐIr   c                 ó¨  —  G d„ dt           ¦  «        } |¦   «         }t          ¦   «         |_        t          ¦   «         |_        |                     ¦   «          |                     ¦   «         }|                      |¦  «        }|                      d|j	        ¦  «         |                      d|j
        ¦  «         |                      d|j        ¦  «         d S )Nc                   ó<   — e Zd ZdZdZg ZdZdZ e¦   «         Z	d„ Z
dS )úFOnConnectingTests.test_on_connecting_client_success.<locals>.TestProtoNTé   é   c                 ó&   — t          ddd¬¦  «        S )Nr�   r|   ú/ws©Úhostr~   Úresourcer	   )r   r²   s     r   r´   zSOnConnectingTests.test_on_connecting_client_success.<locals>.TestProto.onConnecting   s"   € Ý(Ø&ØØ"ðñ ô ð r   )rJ   rK   rL   rµ   r¶   ÚperMessageCompressionOffersÚversionrS   r   r   r´   rN   r   r   r·   rÂ   ˜  sI   € € € € € ØˆEØˆHØ*,Ð'ØˆGØ#$Ð Ø�$‘&”&ˆCðð ð ð ð r   r·   r�   r|   rÆ   )r   r   rR   r   r   r5   r¸   r¹   r˜   rÈ   r~   rÉ   )r   r·   r   r¼   Úreqs        r   Ú!test_on_connecting_client_successz3OnConnectingTests.test_on_connecting_client_success–  sÔ   € ð	ð 	ð 	ð 	ð 	Õ/ñ 	ô 	ð 	ð �	‘”ˆÝ'™/œ/ˆŒÝ™œˆŒØ×ÒÑÔÐà× Ò Ñ"Ô"ˆØ×"Ò" 1Ñ%Ô%ˆØ×Ò˜¨¬Ñ1Ô1Ð1Ø×Ò˜˜cœhÑ'Ô'Ð'Ø×Ò˜ ¤Ñ-Ô-Ð-Ð-Ð-r   c                 ó^   — t          t           j        ddi ¬¦  «        }t          |¦  «         d S )Nr�   F)Úchannel_typer©   Ú	is_secureÚ
channel_id)r   ÚCHANNEL_TYPE_FUNCTIONr/   )r   Údetailss     r   Útest_str_transportz$OnConnectingTests.test_str_transport²  s6   € Ý"Ý)Ô?ØØØð	
ñ 
ô 
ˆõ 	ˆG‰Œˆˆˆr   c                 óH   — t          ddd¬¦  «        }t          |¦  «         d S )Nr�   Ú1234rÆ   rÇ   )r
   r/   )r   rÌ   s     r   Útest_str_connectingz%OnConnectingTests.test_str_connecting¼  s%   € Ý ]¸È%ÐPÑPÔPˆåˆC‰Œˆˆˆr   N)rJ   rK   rL   rM   r¿   rÍ   rÔ   r×   rN   r   r   r¬   r¬   v  s]   € € € € € ðð ðJð Jð Jð0.ð .ð .ð8ð ð ðð ð ð ð r   r¬   )"Úunittest.mockr   ÚtxaioÚuse_twistedÚautobahn.utilr   Úautobahn.twisted.websocketr   r   r   Úautobahn.wamp.typesr   Úautobahn.websocket.typesr
   Útwisted.python.failurer   Útwisted.internet.errorr   r   r   Útwisted.trialr   Útwisted.internet.testingr   ÚImportErrorÚtwisted.test.proto_helpersÚautobahn.testutilr   ÚTestCaser   rP   r^   r£   r¬   rN   r   r   ú<module>rç      sd  ðð6 Ð Ð Ð Ð Ð à €€€Ø €Ô Ñ Ô Ð à ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø =Ð =Ð =Ð =Ð =Ð =Ø >Ð >Ð >Ð >Ð >Ð >Ø >Ð >Ð >Ð >Ð >Ð >Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø *Ð *Ð *Ð *Ð *Ð *ðð ð ð ð ð ð ð ð ð à "Ð "Ð "Ð "Ð "Ð "ð;Ø8Ð8Ð8Ð8Ð8Ð8Ð8øØð ;ð ;ð ;Ø:Ð:Ð:Ð:Ð:Ð:Ð:Ð:ð;øøøà +Ð +Ð +Ð +Ð +Ð +ð91ð 91ð 91ð 91ð 91˜XÔ.ñ 91ô 91ð 91ðxEð Eð Eð Eð E˜HÔ-ñ Eô Eð Eð2
ð 
ð 
ð 
ð 
˜hÔ/ñ 
ô 
ð 
ðD+að +að +að +að +a˜XÔ.ñ +aô +að +að\Ið Ið Ið Ið I˜Ô)ñ Iô Ið Ið Ið Is   ÁA ÁA*Á)A*