Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_xmlrpc.cpython-39.pyc

a

��gA��@sddlZddlZddlZddlZddlZddlZddlmZddlmZ	ddl
ZddlZ
ddl
Z
ddlZ
ddlZddlZddlZddlZddlZddlmZddlmZddlmZmZmZzddlZWney�dZYn0dddd	d
ge	�d�ded�dd
de	�d�e	�d�e	�e�dd	dddd��d�gZ Gdd�dej!�Z"Gdd�dej!�Z#Gdd�dej!�Z$Gdd�dej!�Z%Gdd �d ej!�Z&Gd!d"�d"ej!�Z'da(a)a*dPd#d$�Z+dQd%d&�Z,d'd(�Z-d)d*�Z.Gd+d,�d,ej!�Z/Gd-d.�d.e/�Z0Gd/d0�d0e/�Z1Gd1d2�d2e/�Z2Gd3d4�d4e/�Z3Gd5d6�d6e3�Z4Gd7d8�d8e3�Z5e�6edud9�Gd:d;�d;e/��Z7e�6edud9�Gd<d=�d=ej!��Z8Gd>d?�d?e/�Z9Gd@dA�dAej!�Z:GdBdC�dCe
jj;�Z<GdDdE�dEej!�Z=ej>dRdGdH��Z?GdIdJ�dJej!�Z@GdKdL�dLej!�ZAdMdN�ZBeCdOk�re�D�dS)S�N)�mock)�support)�
socket_helper)�	ALWAYS_EQ�LARGEST�SMALLESTzfoo@bar.baz.spamgH�zns�@i�z.zyx.41�my dog has fleasFu	䀀怀耀z
regular value�20050210T11:41:23)	��r�
��)�r����rrr
rr)ZastringZafloatZanintZ
ashortlongZanotherlistZabase64Zb64bytesZb64bytearrayZboolean�unicodeuukey䀀Z	datetime1Z	datetime2Z	datetime3c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-S).�XMLRPCTestCasecCs.t�tf�}t�|�}|�t|dd�dS)Nr)�	xmlrpclib�dumps�alist�loads�assertEqual)�self�dump�load�r�,/usr/local/lib/python3.9/test/test_xmlrpc.py�test_dump_load.s
zXMLRPCTestCase.test_dump_loadcCs6t�dddddd�}|�|t�d��t�|f�}tj|dd	�\}}|\}|�||�|�t|�tj�|�|�tj|d
d	�\}}|\}|�||�|�t|�tj�|�|�tj|dd�\}}|\}|�||�|�t|�tj�|�|�tj|d
d�\}}|\}|�||�|�t|�tj�|�|�dS)Nrrrr
rrr
T��use_builtin_typesF)Zuse_datetime�	�datetimerr�DateTimerr�assertIs�type�assertIsNone�rZdt�s�result�mZnewdtrrr�test_dump_bare_datetime3s.


z&XMLRPCTestCase.test_dump_bare_datetimecCs�t�dddddd�}|�|t�d��t�|f�}tj|dd	�\}}|\}|�||�|�t|�tj�|�|�tj|d
d	�\}}|\}|�||�|�t|�tj�|�|�dS)Nrrrr
rrz00010210T11:41:23TrFr!r'rrr�test_datetime_before_1900Us
z(XMLRPCTestCase.test_datetime_before_1900cCsRt��}t�tj|fdd��\\}}|�|jt�tj|fdd�}|�|t�dS)NT��methodresponse)rr#rrZassertIsInstance�value�str)r�dZnew_d�dummyr(rrr�test_bug_1164912gs�zXMLRPCTestCase.test_bug_1164912cCsLGdd�dt�}|�}d|_d|_t�t�|f��\\}}|�||j�dS)Nc@seZdZdS)z-XMLRPCTestCase.test_newstyle_class.<locals>.TN)�__name__�
__module__�__qualname__rrrr�Trsr7�dZHello)�object�x�yrrrr�__dict__)rr7�t�t2r2rrr�test_newstyle_classqsz"XMLRPCTestCase.test_newstyle_classcCs|�ttjddf�dS)Nr�c)�assertRaises�
OverflowErrorrr�rrrr�test_dump_big_longzsz!XMLRPCTestCase.test_dump_big_longcCs|�ttjddif�dS)N�rr�r�rA�	TypeErrorrrrCrrr�test_dump_bad_dict}sz!XMLRPCTestCase.test_dump_bad_dictcCs4gd�}ddd|g}|�|�|�ttj|f�dS)NrErF��)�appendrArHrr)r�lr=rrr�test_dump_recursive_seq�s
z&XMLRPCTestCase.test_dump_recursive_seqcCs2ddd�}d|d�}||d<|�ttj|f�dS)Nr)�1�2rF)�3r1r=rG�rr1r=rrr�test_dump_recursive_dict�s

z'XMLRPCTestCase.test_dump_recursive_dictcCs�tjdkr |�ttjtd�f�t�tjtjf�|�ttjtjdf�|�ttjtjdf�dd�}t�	�}|�
tj|�|�
tj|�|�t|j
tjd|�|�t|j
tjd|�dS)Ni����rcSsdS�Nr�r(rrr�dummy_write�sz5XMLRPCTestCase.test_dump_big_int.<locals>.dummy_write)�sys�maxsizerArBrr�int�MAXINT�MININT�
MarshallerZdump_int�rrWr*rrr�test_dump_big_int�s*

�

�

�

�

�z XMLRPCTestCase.test_dump_big_intcCs�t�td�f�t�ttj�ttj�f�t�ttjd�ttjd�f�dd�}t��}|�tj|�|�tj|�|�tjd|�|�tjd|�dS)NrT�*cSsdSrUrrVrrrrW�sz4XMLRPCTestCase.test_dump_double.<locals>.dummy_write)rr�floatr[r\r]Zdump_doubler^rrr�test_dump_double�s��zXMLRPCTestCase.test_dump_doublecCsTtdg}tdgf}tj|dd�}|�|t�|�dd�|�ttj|f�dS)NT)�
allow_noner)rrrrrrArH)rr/Zarg1�strgrrr�test_dump_none�s
�zXMLRPCTestCase.test_dump_nonecCs�ddi}tj|fdd�}d|}|�t�|�dd|�|�dd�}|�t�|�dd|�tj|fddd	�}|�t�|�dd|�|�dd�}|�t�|�dd|�d
}tj|fd|d�}|�t�|�dd|�|�t�|�d|�dS)
Nukey€¤u
value€¤�iso-8859-15��encodingz,<?xml version='1.0' encoding='iso-8859-15'?>r�xmlcharrefreplaceT)rhr.umethod€¤)rh�
methodnamer)rrrr�encode)rr/rdrjrrr�test_dump_encoding�s(�
�
�z!XMLRPCTestCase.test_dump_encodingcCs�d}|�|t�|��tttjfD]�}||�}t�|f�}tj|dd�\}}|\}|�||�|�t|�t�|�	|�tj|dd�\}}|\}|�||�|�t|�tj�|�	|�q"dS)Nr	TrF)
rr�Binary�bytes�	bytearrayrrr$r%r&)r�sample�type_r/r(r)r*�newvaluerrr�test_dump_bytes�s
zXMLRPCTestCase.test_dump_bytescCsFtj}d}|�|tj|�d}|�|tj|�d}|�|tj|�dS)Nz6<params><param><value><spam/></value></param></params>zT<params><param><value><array><value><spam/></value></array></value></param></params>z�<params><param><value><struct><member><name>a</name><value><spam/></value></member><member><name>b</name><value><spam/></value></member></struct></value></param></params>)r�
ResponseErrorrAr)rrt�datarrr�test_loads_unsupported�sz%XMLRPCTestCase.test_loads_unsupportedcKsRd|}tj|fi|��\}}|\}|�||�|�t|�t|��|�|�dS)Nz1<params><param><value>%s</value></param></params>)rrrr$r%r&)rr(r/�kwargsrr)r*rrrrr�check_loads�szXMLRPCTestCase.check_loadsc
Cs�|j}|dd�|dd�|dd�|dd�|dd�|d	d�|d
d�|dd
�|dt�d��|dddd�|dt�d��|dt�dddddd�dd�|dddg�|dddd��dS)N�stringz<string>string</string>u4<string>𝔘𝔫𝔦𝔠𝔬𝔡𝔢 string</string>u#𝔘𝔫𝔦𝔠𝔬𝔡𝔢 stringz<int>2056183947</int>i��zz<int>-2056183947</int>iuq�z<i4>2056183947</i4>z<double>46093.78125</double>g���@z<boolean>0</boolean>Fz%<base64>AGJ5dGUgc3RyaW5n/w==</base64>s
byte string�Trz6<dateTime.iso8601>20050210T11:41:23</dateTime.iso8601>r
rrrr
rrzR<array><data><value><int>1</int></value><value><int>2</int></value></data></array>rz�<struct><member><name>b</name><value><int>2</int></value></member><member><name>a</name><value><int>1</int></value></member></struct>)�a�b)rxrrmr#r"�r�checkrrr�test_load_standard_types�s8







������z'XMLRPCTestCase.test_load_standard_typescCs`|j}|dd�|dd�|dd�|dd�|dd�|d	d
�|dd�|d
t�d��dS)Nz<nil/>z	<ex:nil/>z<i1>205</i1>��z<i2>20561</i2>iQPz<i8>9876543210</i8>l�`	z-<biginteger>98765432100123456789</biginteger>l5�?�4*UUz<float>93.78125</float>grW@z.<bigdecimal>9876543210.0123456789</bigdecimal>z9876543210.0123456789)rx�decimalZDecimalr|rrr�test_load_extension_typess




�
�z(XMLRPCTestCase.test_load_extension_typesc	Cs�|j}d}t�|���d|d}|�t��"|d|�d�d�Wd�n1sT0Y|�t��"|d|�d�d�Wd�n1s�0YWd�n1s�0YdS)Ni�rOrz<int>z</int>z<biginteger>z
</biginteger>)rxrZadjust_int_max_str_digitsrA�
ValueError)rr}Z	maxdigitsr(rrr�test_limit_int s0zXMLRPCTestCase.test_limit_intcCs(tj��}|�|�d�ddgif�dS)Nz
user@host.tldzhost.tld)Z
AuthorizationzBasic dXNlcg==)�xmlrpc�client�	TransportrZ
get_host_info)rZtransprrr�test_get_host_info*s
��z!XMLRPCTestCase.test_get_host_infocCszzddl}Wnty"d}Yn0d}ztj�d���Wn8tyZ|�|d�Yntyt|�	|�Yn0dS)NrFTzhttps://localhost:9999z&xmlrpc client's error with SSL support)
�ssl�ImportErrorr�r��ServerProxyZbad_function�NotImplementedError�assertFalse�OSError�
assertTrue)rr�Zhas_sslrrr�test_ssl_presence1s
z XMLRPCTestCase.test_ssl_presencecs�Gdd�dtjj�}�fdd�}tj�tjdf|��|��j�tj	|d�}|�
�|�|j�dj�j
�}t�|��0}|�|��d�|�|��d�Wd�n1s�0YdS)	Nc@s$eZdZdZdZdd�Zdd�ZdS)z@XMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandler�HTTP/1.1FcSs�t|j�d��}|j�|�|jr,d|_dStjddd�}|�	�}|�
tjj
�|�dt|��|��|j�|�d|_d|_dS)N�Content-LengthT)rKr-F)rZ�headers�getZrfile�read�handledZclose_connectionrrrkZ
send_response�httpZ
HTTPStatusZOKZsend_header�lenZend_headersZwfile�write)r�length�responserrr�do_POSTDszHXMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandler.do_POSTcWsdSrUr)r�format�argsrrr�log_messageSszLXMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandler.log_messageN)r4r5r6�protocol_versionr�r�r�rrrr�RequestHandler@sr�cs$�j�td��������dS�Nr)�socket�
settimeoutra�handle_requestr��serverrr�
run_serverWsz<XMLRPCTestCase.test_keepalive_disconnect.<locals>.run_serverr)�targetz
http://{}:{}/rK)r�r�ZBaseHTTPRequestHandlerZ
HTTPServerrZHOST�
addCleanup�server_close�	threading�Thread�start�joinr�Zserver_addressrr�r�method)rr�r��thread�url�prr�r�test_keepalive_disconnect?sz(XMLRPCTestCase.test_keepalive_disconnectN)r4r5r6rr+r,r3r?rDrIrNrSr_rbrerlrsrvrxr~r�r�r�r�r�rrrrr,s,"
	

rc@sLeZdZGdd�de�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dS)�SimpleXMLRPCDispatcherTestCasec@seZdZdZdS)z*SimpleXMLRPCDispatcherTestCase.DispatchExczSRaised inside the dispatched functions when checking for
        chained exceptionsN)r4r5r6�__doc__rrrr�DispatchExchsr�cs�d}�fdd�}tj��}|�|����j��}|�d|�Wd�n1sR0Y��|jj	|f���
|jj���
|jj�dS)z$Calls explicitly registered functionrEcs��|��dSrU)r�)�paramsrCrr�dispatched_funcsszQSimpleXMLRPCDispatcherTestCase.test_call_registered_func.<locals>.dispatched_funcr�N)
r�r��SimpleXMLRPCDispatcher�register_functionrAr��	_dispatchr�	exceptionr�r&�	__cause__�__context__)r�
exp_paramsr��
dispatcher�exc_ctxrrCr�test_call_registered_funcls

*z8SimpleXMLRPCDispatcherTestCase.test_call_registered_funccCs�d}Gdd�d�}tj��}|�|��|�|j��}|�d|�Wd�n1sV0Y|�|jj	|f�|�
|jj�|�
|jj�dS)z3Calls a registered instance attribute as a functionrEc@seZdZdd�ZdS)zOSimpleXMLRPCDispatcherTestCase.test_call_instance_func.<locals>.DispatchedClasscWst�|��dSrU�r�r�)rr�rrrr��sz_SimpleXMLRPCDispatcherTestCase.test_call_instance_func.<locals>.DispatchedClass.dispatched_funcN)r4r5r6r�rrrr�DispatchedClass�sr�r�N�
r�r�r��register_instancerAr�r�rr�r�r&r�r�)rr�r�r�r�rrr�test_call_instance_func~s
*z6SimpleXMLRPCDispatcherTestCase.test_call_instance_funccCs�d}d}Gdd�d�}tj��}|�|��|�|j��}|�||�Wd�n1sZ0Y|�|jj	||f�|�
|jj�|�
|jj�dS)z4Calls the registered instance's `_dispatch` functionr�rEc@seZdZdd�ZdS)zLSimpleXMLRPCDispatcherTestCase.test_call_dispatch_func.<locals>.TestInstancecSst�||��dSrUr�)rr�r�rrrr��s�zVSimpleXMLRPCDispatcherTestCase.test_call_dispatch_func.<locals>.TestInstance._dispatchN)r4r5r6r�rrrr�TestInstance�sr�Nr�)rZ
exp_methodr�r�r�r�rrr�test_call_dispatch_func�s
*z6SimpleXMLRPCDispatcherTestCase.test_call_dispatch_funccCsTtj��}|jddd�|�td��|�dd�Wd�n1sF0YdS)z2Calls explicitly registered function which is NoneNr���name�Zparam)r�r�r�r��assertRaisesRegex�	Exceptionr��rr�rrr�test_registered_func_is_none�s
z;SimpleXMLRPCDispatcherTestCase.test_registered_func_is_nonecCsRtj��}|�t��|�td��|�dd�Wd�n1sD0YdS)z>Attempts to call nonexistent function on a registered instancer�r�N)r�r�r�r�r9r�r�r�r�rrr�test_instance_has_no_func�s
z8SimpleXMLRPCDispatcherTestCase.test_instance_has_no_funccCsFtj��}|�td��|�dd�Wd�n1s80YdS)z2Calls a function that the dispatcher cannot locater�r�N)r�r�r�r�r�r�r�rrr�test_cannot_locate_func�s
z6SimpleXMLRPCDispatcherTestCase.test_cannot_locate_funcN)r4r5r6r�r�r�r�r�r�r�r�rrrrr�gsr�c@seZdZdd�ZdS)�HelperTestCasecCs:|�t�d�d�|�t�d�d�|�t�d�d�dS)Nza&bza&amp;bza<bza&lt;bza>bza&gt;b)rr�escaperCrrr�test_escape�szHelperTestCase.test_escapeN)r4r5r6r�rrrrr��sr�c@s$eZdZdd�Zdd�Zdd�ZdS)�
FaultTestCasecCs4t�dd�}|�t|�d�|�t|�t|��dS)Nr`�
Test Faultz<Fault 42: 'Test Fault'>)r�Faultr�reprr0)r�frrr�	test_repr�szFaultTestCase.test_reprcCsjt�dd�}t�|f�}t�|�\\}}|�|ddd��|�|d�t���|�}|�tjtj|�dS)Nr`r�)�	faultCode�faultString)rr�rrrr]rA)rr�r(Znewfr*rrr�test_dump_fault�szFaultTestCase.test_dump_faultcCs,|�ttjjtd�|�tj�td��dS�NZ__add�title)rA�AttributeErrorr�r��resolve_dotted_attributer0r�rCrrr�test_dotted_attribute�s
�z#FaultTestCase.test_dotted_attributeN)r4r5r6r�r�r�rrrrr��s
r�c@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�DateTimeTestCasecCsjt�d��L}t�gd��}||_t��}t��}|�t	|�t�
d|��Wd�n1s\0YdS)Nztime.localtime)	i���r��1r��r�%Y%m%dT%H:%M:%S)rZpatch�time�struct_timeZreturn_value�	localtimerr#rr0�strftime)rZlocaltime_mockZtime_structr�r=rrr�test_default�s�

�zDateTimeTestCase.test_defaultc	Cs0d}t�|�}|�t|�t�dt�|���dS�Ngl]�ޮ��Ar�)rr#rr0r�r�r�rRrrr�	test_time�s


�zDateTimeTestCase.test_timecCs"d}t�|�}|�t|�d�dS)N)	����	r�&�2rK�rz20070609T10:38:50)rr#rr0rRrrr�test_time_tuple�s
z DateTimeTestCase.test_time_tuplecCs0t�d�}t�|�}|�t|�t�d|��dSr�)r�r�rr#rr0r�rRrrr�test_time_struct�s

z!DateTimeTestCase.test_time_structcCs2t�dddddd�}t�|�}|�t|�d�dS)Nr�rrrFrJrKz20070102T03:04:05)r"rr#rr0rRrrr�test_datetime_datetime�s
z'DateTimeTestCase.test_datetime_datetimecCs>t�dddddd�}t�|�}dt|�}|�t|�|�dS)Nr�rrrFrJrKz%<DateTime '20070102T03:04:05' at %#x>)r"rr#�idrr�)rr1r=�valrrrr��s
zDateTimeTestCase.test_reprc
CsVd}t��}|�|�t�t�dddddd��}|�||�t�|�}|�||�dS)Nz 20070908T07:11:13  r�r��r�r
�
)rr#�decoder"rZ	_datetime)rr1�t1Ztrefr>rrr�test_decodes

zDateTimeTestCase.test_decodecCsftj��}t�|���}|�||k�|�||k�|tjdd�}|�||k�|�||k�|�d�}|�||k�|�||k�t�|���}|�||k�|�||k�|�d�}|��}|�	|dk�|�||k�|�	|t
|�k�|�||k�|�t��|t
d�kWd�n1�s,0Y|�t��||kWd�n1�s`0Y|�t��|t
|�kWd�n1�s�0Y|�t��||kWd�n1�s�0Y|�|tk�|�	|tk�|�|tk�|�	|tk�|�|tk�|�	|tk�|�	|tk�|�|tk�|�	|tk�|�|tk�dS)NrJ)Zsecondsr��asciii�)r"�nowrr#Z	timetupler�Z	timedeltar�rkr�rorArHrarrr)rrZdtimeZthenZdstrZ
dtime_thenZdbytesZdtuplerrr�test_comparisonsJ


,(,(z DateTimeTestCase.test_comparisonN)r4r5r6r�r�r�r�r�r�rrrrrrr��s

r�c@s$eZdZdd�Zdd�Zdd�ZdS)�BinaryTestCasecCst��}|�t|�d�dS)N��rrmrr0)rr=rrrr�AszBinaryTestCase.test_defaultcCs(d}t�|�}|�t|�t|d��dS�Nsabc123��zlatin-1rrRrrr�test_stringEs
zBinaryTestCase.test_stringcCsZd}t�|�}t��}|�|�|�t|�t|d��t�|�}|�t|�t|d��dSr)�base64Zencodebytesrrmr�rr0Z_binary)rr1�derr>rrrrJs


zBinaryTestCase.test_decodeN)r4r5r6r�r	rrrrrr:src
Cs@Gdd�d�}Gdd�dtjj�}|s.tjj}|d||ddd�}z�z�|��|j��\aadttfa	|�
�|��|��|�
t�|�
d	d
�d�|j
dd
��}|j
dd�dd��}|�}	|j|	dd�|��|dkr�|��|d8}q�Wntj�yYn0W|j��da|��n|j��da|��0dS)Nc@s*eZdZdd�Zdd�ZGdd�d�ZdS)z&http_server.<locals>.TestInstanceClasscSs||SrUr�rr:r;rrr�div\sz*http_server.<locals>.TestInstanceClass.divcSs|dkrdSdS�Nr
�This is the div functionr�rr�rrr�_methodHelp_sz2http_server.<locals>.TestInstanceClass._methodHelpc@seZdZedd��ZdS)z.http_server.<locals>.TestInstanceClass.FixturecSsdS)N�42rrrrr�getDatadsz6http_server.<locals>.TestInstanceClass.Fixture.getDataN)r4r5r6�staticmethodrrrrr�FixturecsrN)r4r5r6r
rrrrrr�TestInstanceClass[src@seZdZdd�ZdS)z#http_server.<locals>.MyXMLRPCServercSs |j��\}}|�d�||fS�NT�r��accept�setblocking�rr(�portrrr�get_requestis
z/http_server.<locals>.MyXMLRPCServer.get_requestN�r4r5r6rrrrr�MyXMLRPCServerhsr��	localhostrF)rh�logRequests�bind_and_activate�http://%s:%dcSs|SrUr)r:rrr�<lambda>��zhttp_server.<locals>.<lambda>�têštcSsdS��This is my functionTrrrrr�my_function�sz http_server.<locals>.my_function�addr�cSs||SrUr�r:r;rrr�_�szhttp_server.<locals>._T)Zallow_dotted_namesrr)r�r��SimpleXMLRPCServer�SimpleXMLRPCRequestHandler�server_bindr��getsockname�ADDR�PORT�URL�server_activate� register_introspection_functions�register_multicall_functionsr��powr��setr��timeout�close)
�evt�numrequests�requestHandlerrhrr�servr*r-ZtestInstancerrr�http_serverZsF
�





�
r@cCs�Gdd�d�}dd�}Gdd�dtjj�}|s6tjj}Gdd�d|�}Gd	d
�d
�}|d|ddd
�}|j�d�|���zz�|j��\aa	dtt	fa
|��gd�}	|	D]:}
|�|
tj�
��}|��|��|�|
fdd�d�q�|�|	d��t�|�|	d��dd�d�|�d|��|��|dk�rJ|��|d8}�q,Wntj�ybYn0W|j��da	|��n|j��da	|��0dS)Nc@seZdZdd�Zdd�ZdS)z,http_multi_server.<locals>.TestInstanceClasscSs||SrUrrrrrr
�sz0http_multi_server.<locals>.TestInstanceClass.divcSs|dkrdSdSrrrrrrr�sz8http_multi_server.<locals>.TestInstanceClass._methodHelpN)r4r5r6r
rrrrrr�srcSsdSr(rrrrrr*�sz&http_multi_server.<locals>.my_functionc@seZdZdd�ZdS)z)http_multi_server.<locals>.MyXMLRPCServercSs |j��\}}|�d�||fSrrrrrrr�s
z5http_multi_server.<locals>.MyXMLRPCServer.get_requestNrrrrrr�src@seZdZgZdS)z+http_multi_server.<locals>.MyRequestHandlerN)r4r5r6Z	rpc_pathsrrrr�MyRequestHandler�srAc@seZdZddd�ZdS)z+http_multi_server.<locals>.BrokenDispatcherNcSstd��dS)Nzbroken dispatcher)�RuntimeError)rruZdispatch_method�pathrrr�_marshaled_dispatch�sz?http_multi_server.<locals>.BrokenDispatcher._marshaled_dispatch)NN)r4r5r6rDrrrr�BrokenDispatcher�srEr F)r"r#rFr$)
�/foo�/foo/bar�/foo?k=v�	/foo#frag�
/foo?k=v#fragr�/�/RPC2�?k=v�#fragcSs|SrUr)r�rrrr%�r&z#http_multi_server.<locals>.<lambda>�testrrcSs||SrUrr,rrrr%�r&r+�
/is/broken)r�r�ZMultiPathXMLRPCServerr/r�r�r0r1r2r3r4r5Zadd_dispatcherr�r6r7r�Zget_dispatcherr8r9r�r:r;)r<r=r>rr*rrArEr?�pathsrCr1rrr�http_multi_server�sJ�


�
rRcCs^z*|jdks|jdurWdS|j�d�}WntyDt|�}Yn0|rZd|��vrZdSdS)z�Returns True if the given ProtocolError is the product of a server-side
       exception caused by the 'temporarily unavailable' response sometimes
       given by operations on non-blocking sockets.rNT�X-exceptionztemporarily unavailable)Zerrcoder�r�r�r0�lower)�eZexc_messrrr�is_unavailable_exception�srVcs|sdd�S�fdd�}|S)NcSs|SrUr)�funcrrrr%�r&z)make_request_and_skipIf.<locals>.<lambda>cs�fdd�}|S)Nc
sVzt�t���Wn4tjtfyF}zt|�s2�WYd}~n
d}~00t����dSrU)	rr�r4r*�
ProtocolErrorr�rV�unittestZSkipTest)rrU��reasonrr�make_request_and_skip�szImake_request_and_skipIf.<locals>.decorator.<locals>.make_request_and_skipr)rWr\rZrr�	decorator�sz*make_request_and_skipIf.<locals>.decoratorr)Z	conditionr[r]rrZr�make_request_and_skipIf�s	r^c@s,eZdZdZdZee�Zdd�Zdd�Z	dS)�BaseServerTestCaseNrcCs`dtjj_t��|_|j|j|jf}tj	|j
|d�}|��|�|j
�|j��|j��dS)NT�r�r�)r�r�r.�_send_traceback_headerr��Eventr<�
request_countr>r��
threadFuncr�r�r��wait�clear�rZ	serv_argsr�rrr�setUps


zBaseServerTestCase.setUpcCs|j��dtjj_dS�NF)r<rer�r�r.rarCrrr�tearDowns
zBaseServerTestCase.tearDown)
r4r5r6r>rcrr@rdrhrjrrrrr_s
r_c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	e
ejj
dkd�dd��Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%S)&�SimpleServerTestCasecCstz"t�t�}|�|�dd�d�WnLtjtfyn}z.t|�sZ|�d|t	|dd�f�WYd}~n
d}~00dS)Nr�r����%s
%sr�r)
rr�r4rr8rXr�rV�fail�getattr�rr�rUrrr�test_simple1s
z!SimpleServerTestCase.test_simple1cCs�d}d}z&t�t�}|�|�||�||�WnLtjtfyz}z.t|�sf|�d|t	|dd�f�WYd}~n
d}~00dS)NuPŷtuhơnrmr�r)
rr�r4rr+rXr�rVrnro�rZstart_stringZ
end_stringr�rUrrr�
test_nonascii)s
�z"SimpleServerTestCase.test_nonasciicCs�d}d}z*tjtdd�}|�|�||�||�WnNtjtjfy�}z.t|�sl|�	d|t
|dd�f�WYd}~n
d}~00dS)N�€�¤rfrgrmr�r�rr�r4rr+rXr��errorrVrnrorrrrr�test_client_encoding6s�z)SimpleServerTestCase.test_client_encodingcCsxz$tjtdd�}|�|�d�d�WnNtjtjfyr}z.t|�s^|�	d|t
|dd�f�WYd}~n
d}~00dS)Nrrgr`rmr�r)rr�r4rttêštrXr�rwrVrnrorprrr�test_nonascii_methodnameDsz-SimpleServerTestCase.test_nonascii_methodnamecCsht�tj�tt���$}|�dd�|��}Wd�n1s>0Y|�	|j
d�|�	|jd�dS)NZPOSTz/this-is-not-validi�z	Not Found)�
contextlib�closingr�r�ZHTTPConnectionr2r3ZrequestZgetresponser�statusr[)r�connr�rrr�test_404Ns
&zSimpleServerTestCase.test_404cCs�tgd��}z(t�t�}|j��}|�t|�|�WnLtjtfy�}z.t	|�sl|�
d|t|dd�f�WYd}~n
d}~00dS)N)
r8r
r*r+r'zsystem.listMethodszsystem.methodHelpzsystem.methodSignaturezsystem.multicallrrmr�r)r9rr�r4�systemZlistMethodsrrXr�rVrnro)rZexpected_methodsr��methrUrrr�test_introspection1Xs

z(SimpleServerTestCase.test_introspection1cCsxz&t�t�}|j�d�}|�|d�WnLtjtfyr}z.t|�s^|�	d|t
|dd�f�WYd}~n
d}~00dS)Nr
rrmr�r�rr�r4rZ
methodHelprrXr�rVrnro)rr�ZdivhelprUrrr�test_introspection2hs
z(SimpleServerTestCase.test_introspection2rz)Docstrings are omitted with -O2 and abovecCsxz&t�t�}|j�d�}|�|d�WnLtjtfyr}z.t|�s^|�	d|t
|dd�f�WYd}~n
d}~00dS)Nr*r)rmr�rr�)rr�Z
myfunctionrUrrr�test_introspection3ts
z(SimpleServerTestCase.test_introspection3cCsxz&t�t�}|j�d�}|�|d�WnLtjtfyr}z.t|�s^|�	d|t
|dd�f�WYd}~n
d}~00dS)Nr
zsignatures not supportedrmr�r)rr�r4rZmethodSignaturerrXr�rVrnro)rr�ZdivsigrUrrr�test_introspection4�s
z(SimpleServerTestCase.test_introspection4cCs�zlt�t�}t�|�}|�dd�|�dd�|�dd�|�\}}}|�|d�|�|d�|�|d�WnLtjt	fy�}z.t
|�s�|�d	|t|d
d�f�WYd}~n
d}~00dS)NrrFr�r��r`rKrlrmr�r)
rr�r4�	MultiCallr+r8r
rrXr�rVrnro)rr��	multicall�
add_resultZ
pow_resultZ
div_resultrUrrr�test_multicall�s

z#SimpleServerTestCase.test_multicallcCs�zRt�t�}t�|�}|��|�}|�|jddd�|�|jddd�WnLtjtfy�}z.t	|�s�|�
d|t|dd�f�WYd}~n
d}~00dS)	Nrr�rr�z@<class 'Exception'>:method "this_is_not_exists" is not supportedrmr�r)rr�r4r�Zthis_is_not_existsr�resultsrXr�rVrnro)rr�r�r)rUrrr�test_non_existing_multicall�s

�z0SimpleServerTestCase.test_non_existing_multicallcCs4|�ttjjtd�|�tj�td��|��dSr�)rAr�r�r�r�r0r�rqrCrrrr��s

�z*SimpleServerTestCase.test_dotted_attributecCs,t�dttf�}|j��}|�|d�dS)N�http://%s:%d/RPC2r)rr�r2r3rrr)rr�rurrr�test_allow_dotted_names_true�s
z1SimpleServerTestCase.test_allow_dotted_names_truecCs*t�dttf�}|�|�dd�d�dS)Nr�rz�éuaé)rr�r2r3rr+�rr�rrr�test_unicode_host�sz&SimpleServerTestCase.test_unicode_hostcCsVt�t�ttf���.}|�dt�dt�d��d��Wd�n1sH0YdS)Nz@POST /RPC2 HTTP/1.0
Content-Length: 100

bye HTTP/1.1
Host: �:z2
Accept-Encoding: identity
Content-Length: 0

r)rzr{r��create_connectionr2r3�sendrk)rr}rrr�test_partial_post�s���z&SimpleServerTestCase.test_partial_postcCs^t�t��.}|�dd�|�|d�jd�Wd�n1s>0Y|�|d�jd�dS)NrrF�	transport�NN)rr�r4r+ZassertNotEqual�_connectionrr�rrr�test_context_manager�s�"�z)SimpleServerTestCase.test_context_managercCsfz:t�t��}|�dd�Wd�n1s.0YWntjyNYn0|�|d�jd�dS)Nrrzr�r�)rr�r4r+r�rr�r�rrr�!test_context_manager_method_error�s.�z6SimpleServerTestCase.test_context_manager_method_errorN)r4r5r6rqrsrxryr~r�r�r^rX�flags�optimizer�r�r�r�r�r�r�r�r�r�rrrrrks(



�



rkc@s"eZdZeddd��Zdd�ZdS)�SimpleServerEncodingTestCaseNcCst|||d�dS)Nrf)r@)r<r=r>rhrrrrd�sz'SimpleServerEncodingTestCase.threadFunccCs�d}d}z&t�t�}|�|�||�||�WnNtjtjfy|}z.t|�sh|�	d|t
|dd�f�WYd}~n
d}~00dS)Nrtrurmr�rrvrrrrr�test_server_encoding�s
�z1SimpleServerEncodingTestCase.test_server_encoding)NN)r4r5r6rrdr�rrrrr��sr�c@speZdZee�ZdZdd�Zdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS)�MultiPathServerTestCasercCs:t�td�}|�|�dd�d�|�tj|jdd�dS)NrFr�r�rl)rr�r4rr8rAr�r+�rr�rrr�
test_path1�sz"MultiPathServerTestCase.test_path1cCs:t�td�}|�|�dd�d�|�tj|jdd�dS)NrGr�r��)rr�r4rr+rAr�r8r�rrr�
test_path2sz"MultiPathServerTestCase.test_path2cCs&t�td�}|�tj|jdd�dS)NrPr�r��rr�r4rAr�r+r�rrr�
test_path3sz"MultiPathServerTestCase.test_path3cCs&t�td�}|�tj|jdd�dS)Nz/invalidr�r�r�r�rrr�test_invalid_path
sz)MultiPathServerTestCase.test_invalid_pathcCs"t�td�}|�|��d�dS)NrJ�rr�r4rrOr�rrr�test_path_query_fragmentsz0MultiPathServerTestCase.test_path_query_fragmentcCs"t�td�}|�|��d�dS)NrIr�r�rrr�test_path_fragmentsz*MultiPathServerTestCase.test_path_fragmentcCs"t�td�}|�|��d�dS)NrHr�r�rrr�test_path_querysz'MultiPathServerTestCase.test_path_querycCst�t�}|�|��d�dS)NrLr�r�rrr�test_empty_paths
z'MultiPathServerTestCase.test_empty_pathcCs"t�td�}|�|��d�dS)NrKr�r�rrr�test_root_pathsz&MultiPathServerTestCase.test_root_pathcCs"t�td�}|�|��d�dS)NrMr�r�rrr�test_empty_path_query"sz-MultiPathServerTestCase.test_empty_path_querycCs"t�td�}|�|��d�dS)NrNr�r�rrr�test_empty_path_fragment&sz0MultiPathServerTestCase.test_empty_path_fragmentN)r4r5r6rrRrdrcr�r�r�r�r�r�r�r�r�r�r�rrrrr��sr�c@s,eZdZGdd�dejj�ZeZdd�ZdS)�BaseKeepaliveServerTestCasec@s,eZdZejjZdZgZdd�Z	dd�Z
dS)z*BaseKeepaliveServerTestCase.RequestHandlerr�cCs(|j�g�t|j�d|_|j�|�Sr�)�
myRequestsrLr��reqidx�parentClass�handlerCrrrr�4sz1BaseKeepaliveServerTestCase.RequestHandler.handlecCs$|j�|�}|j|j�|j�|SrU)r��handle_one_requestr�r�rLZraw_requestline)rr)rrrr�8sz=BaseKeepaliveServerTestCase.RequestHandler.handle_one_requestN)r4r5r6r�r�r/r�r�r�r�r�rrrrr�0s
r�cCsg|j_t�|�SrU)r�r�r_rhrCrrrrh>sz!BaseKeepaliveServerTestCase.setUpN)	r4r5r6r�r�r/r�r>rhrrrrr�-s
r�c@seZdZdd�ZdS)�KeepaliveServerTestCase1cCs�t�t�}|�|�dd�d�|�|�dd�d�|�|�dd�d�|d��|�t|jj�d�|�t|jjd�d�dS)Nr�r�rlr;rrr�	rr�r4rr8r�r�r�ZassertGreaterEqualr�rrr�test_twoFs

z!KeepaliveServerTestCase1.test_twoN)r4r5r6r�rrrrr�Esr�c@s eZdZdZdd�Zdd�ZdS)�KeepaliveServerTestCase2rcCs�t�t�}|�|�dd�d�|�|�dd�d�|�|�dd�d�|d��|�|�dd�d�|�|�dd�d�|�|�dd�d�|d��|�t|jj�d�|�t|jjd�d�|�t|jjd�d�dS)Nr�r�rlr;rr���r�r�rrr�
test_close\s


z#KeepaliveServerTestCase2.test_closecCs`t�t�}|�|�dd�d�|d���|�|�dd�d�|d��|�t|jj�d�dS)Nr�r�rlr�r;r)	rr�r4rr8r;r�r�r�r�rrr�test_transportos

z'KeepaliveServerTestCase2.test_transportN)r4r5r6rcr�r�rrrrr�Xsr�z
requires gzipc@sVeZdZGdd�dejj�ZeZGdd�dej	�Z	dd�Z
dd�Zd	d
�Zdd�Z
d
S)�GzipServerTestCasec@s eZdZejjZdZdd�ZdS)z!GzipServerTestCase.RequestHandlerr�cCst|jd�|j_|j�|�S)N�content-length)rZr��	__class__�content_lengthr�r�rCrrrr��sz)GzipServerTestCase.RequestHandler.do_POSTN)	r4r5r6r�r�r/r�r�r�rrrrr�~sr�c@s eZdZdZdd�Zdd�ZdS)zGzipServerTestCase.TransportFcCs t|�dd��|_tj�||�S)Nr�r)rZZ	getheader�response_lengthrr��parse_response)rr�rrrr��sz+GzipServerTestCase.Transport.parse_responsecCs"|jr|�dd�tj�|||�S)NzContent-Encoding�gzip)�	fake_gzipZ	putheaderrr��send_content)r�
connection�bodyrrrr��sz)GzipServerTestCase.Transport.send_contentN)r4r5r6r�r�r�rrrrr��sr�cCst�|�dSrU)r_rhrCrrrrh�szGzipServerTestCase.setUpcCsv|��}d|_tjt|d�}|�|�dd�d�|jj}d|_|�|�dd�d�|jj}|�	||k�|d��dS�N�r�r�r�rlrr;)
r��encode_thresholdrr�r4rr8r�r�r�)rr=r�rzr{rrr�test_gzip_request�sz$GzipServerTestCase.test_gzip_requestcCst|��}d|_d|_tjt|d�}|�tjt�	d��}|�|�
dd�Wd�n1s\0Y|d��dS)NTr�z\b400\br�r�r;)r�r�r�rr�r4r�rX�re�compiler8)rr=r��cmrrr�test_bad_gzip_request�s�*z(GzipServerTestCase.test_bad_gzip_requestcCs�|��}tjt|d�}|jj}d|j_|�|�dd�d�|j}d|j_|�|�dd�d�|d��|j}||j_|�	||k�dSr�)
r�rr�r4r>r�rr8r�r�)rr=r��oldrzr{rrr�test_gzip_response�s
z%GzipServerTestCase.test_gzip_responseN)r4r5r6r�r�r/r�r>rr�rhr�r�r�rrrrr�zs
r�c@seZdZdd�ZdS)�GzipUtilTestCasecCs�d}d|}t�|�}t�|�}|�t|�|�d|d}t�|�}|�td��t�|�Wd�n1sr0Ytj|dd�dS)Ni@�rz#max gzipped payload length exceededr)Z
max_decode)rZgzip_encodeZgzip_decoderr�r�r�)rZmax_gzip_decoderu�encodedZdecodedrrr�test_gzip_decode_limit�s


�(z'GzipUtilTestCase.test_gzip_decode_limitN)r4r5r6r�rrrrr��sr�csleZdZGdd�dejj�ZeZgd�Z�fdd�Z	dd�Z
dd	�Zd
d�Zdd
�Z
dd�Zdd�Z�ZS)�HeadersServerTestCasecs eZdZdZ�fdd�Z�ZS)z$HeadersServerTestCase.RequestHandlerNcs|j|j_t���SrU)r�r��test_headers�superr�rC�r�rrr��s
z,HeadersServerTestCase.RequestHandler.do_POST)r4r5r6r�r��
__classcell__rrr�rr��sr�)ZHostzAccept-EncodingzContent-Typez
User-Agentr�csd|j_t���SrU)r�r�r�rhrCr�rrrh�szHeadersServerTestCase.setUpcCsRt|jt|����}|�t|���|�|��D]\}}|�|�|�|�q2dSrU)�sorted�standard_headers�list�keysZassertListEqual�itemsrr�)rr��
additionalZ
expected_keys�keyr/rrr�assertContainsAdditionalHeaders�sz5HeadersServerTestCase.assertContainsAdditionalHeaderscCs@tjtdgd�}|�|�dd�d�|jj}|�|ddi�dS)N��X-Test�foo�r�r�r�rlr�r��rr�r4rr8r�r�r��rr�r�rrr�test_header�sz!HeadersServerTestCase.test_headercCsDtjtddgd�}|�|�dd�d�|jj}|�|ddd	��dS)
Nr�)�
X-Test-Second�barr�r�r�rlr�r�)r�r�r�r�rrr�test_header_many�s�
�z&HeadersServerTestCase.test_header_manycCs:tjtgd�}|�|�dd�d�|jj}|�|i�dS)Nr�r�r�rlr�r�rrr�test_header_empty�sz'HeadersServerTestCase.test_header_emptycCs>tjtdd�}|�|�dd�d�|jj}|�|ddi�dS)N)r�r�r�r�rlr�r�r�r�rrr�test_header_tuplesz'HeadersServerTestCase.test_header_tuplecCsFtjtddi��d�}|�|�dd�d�|jj}|�|ddi�dS)Nr�r�r�r�r�rl)	rr�r4r�rr8r�r�r�r�rrr�test_header_itemssz'HeadersServerTestCase.test_header_items)r4r5r6r�r�r/r�r>r�rhr�r�r�r�r�r�r�rrr�rr��s	r�c@s$eZdZdd�Zdd�Zdd�ZdS)�ServerProxyTestCasecCstj�|�d|_dS)Nzhttp://fake.localhost)rY�TestCaserhr�rCrrrrhszServerProxyTestCase.setUpcCs"t�|j�}|�|d��d�dS)Nr;)rr�r�rr�rrrr�szServerProxyTestCase.test_closecCs,t��}tj|j|d�}|�|d�|�dS)Nr�r�)rr�r�r�r)rr=r�rrrr�sz"ServerProxyTestCase.test_transportN)r4r5r6rhr�r�rrrrr�sr�cseZdZd�fdd�	Z�ZS)�FailingMessageClassNcs"|��}|dkrdSt��||�S)Nr�zI am broken)rTr�r�)rr�Zfailobjr�rrr�$szFailingMessageClass.get)N)r4r5r6r�r�rrr�rr�#sr�c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�FailingServerTestCasecCsNt��|_|jdf}tjt|d�}|��|�|j�|j��|j�	�dS)Nrr`)
r�rbr<r�r@r�r�r�rerfrgrrrrh,s


zFailingServerTestCase.setUpcCs*|j��dtjj_tjj}|tjj	_
dSri)r<rer�r�r.rar�r��HTTPMessager/�MessageClass)rZ
default_classrrrrj8s

zFailingServerTestCase.tearDowncCs�tjjj}|�|d�dtjj_z"t�t�}|�|�dd�d�WnLtj	t
fy�}z.t|�sz|�d|t
|dd�f�WYd}~n
d}~00dS)	NFTr�r�rlrmr�r)r�r�r.rarrr�r4r8rXr�rVrnro)rZflagvalr�rUrrr�
test_basicAs


z FailingServerTestCase.test_basicc
Cs�ttjj_zt�t�}|�dd�Wnhtj	t
fy�}zJt|�sxt|d�rx|�
|j�d�du�|�
|j�d�du�WYd}~nd}~00|�d�dS)Nr�r�r�rS�X-traceback�ProtocolError not raised)r�r�r�r/r�rr�r4r8rXr�rV�hasattrr�r�r�rnrprrr�test_fail_no_infoSs

,z'FailingServerTestCase.test_fail_no_infoc
Cs�ttjj_dtjj_zt�t	�}|�
dd�Wnjtjtfy�}zLt
|�s�t|d�r�d}|�|j�d�|�|�|j�d�du�WYd}~nd}~00|�d�dS)	NTr�r�r�z5invalid literal for int() with base 10: 'I am broken'rSr�r�)r�r�r�r/r�r.rarr�r4r8rXr�rVr�rr�r�r�rn)rr�rUZexpected_errrrr�test_fail_with_infocs


,z)FailingServerTestCase.test_fail_with_infoN)r4r5r6rhrjr�r�r�rrrrr�+s
	r��utf-8ccs:tj}tjt��|d�t_ztjVW|t_n|t_0dS)zhA variation on support.captured_stdout() which gives a text stream
    having a `buffer` attribute.
    rgN)rX�stdout�io�
TextIOWrapper�BytesIO)rhZorig_stdoutrrr�captured_stdoutys

rc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�CGIHandlerTestCasecCstj��|_dSrU)r�r��CGIXMLRPCRequestHandler�cgirCrrrrh�szCGIHandlerTestCase.setUpcCs
d|_dSrU)rrCrrrrj�szCGIHandlerTestCase.tearDownc	Cs�t����}d|d<t|jjd��}|j��Wd�n1s@0Y|�d�|��}|��d}d�	|��dd��}|�
|d	�|�
|d
�Wd�n1s�0YdS)N�GETZREQUEST_METHODrgrr� rrJZ400zBad Request)r�EnvironmentVarGuardrrrhr��seekr��splitr�r)r�env�data_outr�r|�messagerrr�test_cgi_get�s
(
zCGIHandlerTestCase.test_cgi_getc
Csd}t����}t|jjd��f}t���>}|�|�|�d�tt	|��|d<|j�
�Wd�n1sj0YWd�n1s�0YWd�n1s�0Y|�d�|��}|�t
jt
j|dd��||�d�d�}|�tt�d|��d��t	|��dS)	Naw<?xml version='1.0'?>
        <methodCall>
            <methodName>test_method</methodName>
            <params>
                <param>
                    <value><string>foo</string></value>
                </param>
                <param>
                    <value><string>bar</string></value>
                </param>
            </params>
        </methodCall>
        rgrZCONTENT_LENGTH�,z<?xmlzContent-Length: (\d+)r)rrrrrhZcaptured_stdinr�rr0r�r�r�rArr�r�findrrZr��search�group)rrur	r
Zdata_inr�Zcontentrrr�test_cgi_xmlrpc_response�s(
��

d
�z+CGIHandlerTestCase.test_cgi_xmlrpc_responseN)r4r5r6rhrjrrrrrrr�src@s$eZdZdd�Zdd�Zdd�ZdS)�UseBuiltinTypesTestCasecs�g�_d}t�dddddd�}t�||fd�}�fd	d
�}tjjdddd�}|�|�|�|���	t
�j�d
��j\}}��	�j||g���t|�tj���t|�t
�dS)Nr	i�rK�����foobarcs�j�|�dSrU)�log�extend)r�rCrrr�sz>UseBuiltinTypesTestCase.test_use_builtin_types.<locals>.foobarT)rcrhr r)rr"rrr�r�r�r�rDrr�r$r%rn)rZexpected_bytesZ
expected_dateZ	marshaledr�handlerZmybytesZmydaterrCr�test_use_builtin_types�s�


z.UseBuiltinTypesTestCase.test_use_builtin_typescCstjjdd�}|�|j�dS)NTr)r�r�rr�r )rrrrr�*test_cgihandler_has_use_builtin_types_flag�szBUseBuiltinTypesTestCase.test_cgihandler_has_use_builtin_types_flagcCs(tjjddd�}|��|�|j�dS)Nr Tr)r�r�r.r�r�r r�rrr�,test_xmlrpcserver_has_use_builtin_types_flag�s
�zDUseBuiltinTypesTestCase.test_xmlrpcserver_has_use_builtin_types_flagN)r4r5r6rrrrrrrr�srcCs t��}tjtjg|�R�dSrU)rZthreading_setuprYZaddModuleCleanupZthreading_cleanup)�thread_inforrr�setUpModule�sr�__main__)NN)N)r�)Er
r"r�rXr�rYr�
xmlrpc.clientr�rZ
xmlrpc.serverr�Zhttp.clientr�Zhttp.serverr�r�r�r�rzrOrZtest.supportrrrrr�r�rmror#rr�rr�r�r�r�rr2r3r4r@rRrVr^r_rkr�r�r�r�r�ZskipIfr�r�r�r�r�r�r��contextmanagerrrrrr4�mainrrrr�<module>s�
���=W_
@
HH4"C>ND!


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists