python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_xmlrpc.cpython-311.pyc

eQddlZddlZddlZddlZddlZddlZddlmZddlmZ	ddl
ZddlZ
ddl
Z
ddlZ
ddlZddlZddlZddlZddlZddlmZddlmZddlmZddlmZddlmZmZmZ	ddlZn
#e$rdZYnwxYwejd	d
ddd
dge	j dde!dddde	j"de	j"de	j"ejdd
dddddgZ#Gddej$Z%Gddej$Z&Gdd ej$Z'Gd!d"ej$Z(Gd#d$ej$Z)Gd%d&ej$Z*dxa+xa,a-dNd'Z.dOd(Z/d)Z0d*Z1Gd+d,ej$Z2Gd-d.e2Z3Gd/d0e2Z4Gd1d2e2Z5Gd3d4e2Z6Gd5d6e6Z7Gd7d8e6Z8ej9edud9Gd:d;e2Z:ej9edud9Gd<d=ej$Z;Gd>d?e2Z<Gd@dAej$Z=GdBdCe
jj>Z?GdDdEej$Z@ejAdPdGZBGdHdIej$ZCGdJdKej$ZDdLZEeFdMkrejGdSdS)QN)mock)support)	os_helper)
socket_helper)threading_helper)	ALWAYS_EQLARGESTSMALLESTT)modulezfoo@bar.baz.spamgHzns@iz.zyx.41my dog has fleasFu	䀀怀耀z
regular value20050210T11:41:23)	r
)rrrrrr)astringafloatanint
ashortlonganotherlistabase64b64bytesb64bytearraybooleanunicodeuukey䀀	datetime1	datetime2	datetime3ceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdS)XMLRPCTestCasectjtf}tj|}|t|dddS)Nr)	xmlrpclibdumpsalistloadsassertEqual)selfdumploads   D/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_xmlrpc.pytest_dump_loadzXMLRPCTestCase.test_dump_load2sFx((t$$Q
+++++cZtjdddddd}||tjdtj|f}tj|d	\}}|\}||||t|tj||tj|d
	\}}|\}||||t|tj||tj|d\}}|\}||||t|tj||tj|d
\}}|\}||||t|tj||dS)NrrrrrrrTuse_builtin_typesF)use_datetime	datetimer*r&DateTimer'r)assertIstypeassertIsNoner+dtsresultmnewdts      r.test_dump_bare_datetimez&XMLRPCTestCase.test_dump_bare_datetime7s

tQBB
7
7Y/0CDDEEEORE""OA>>>	###

d5kk8#4555!OA???	###

d5kk9#5666!OAD999	###

d5kk8#4555!OAE:::	###

d5kk9#5666!r0ctjdddddd}||tjdtj|f}tj|d	\}}|\}||||t|tj||tj|d
	\}}|\}||||t|tj||dS)Nrrrrrrz00010210T11:41:23Tr2Fr5r;s      r.test_datetime_before_1900z(XMLRPCTestCase.test_datetime_before_1900Ys!

q1b"b"
5
5Y/0CDDEEEORE""OA>>>	###

d5kk8#4555!OA???	###

d5kk9#5666!r0c,tj}tjtj|fd\\}}||jttj|fd}||tdS)NTmethodresponse)r&r7r)r'assertIsInstancevaluestr)r+dnew_ddummyr=s     r.test_bug_1164912zXMLRPCTestCase.test_bug_1164912ks  %OIOQD;?-A-A-ABB%5ek3///
OUHT:::a%%%%%r0cGddt}|}d|_d|_tjtj|f\\}}|||jdS)NceZdZdS)-XMLRPCTestCase.test_newstyle_class.<locals>.TN)__name__
__module____qualname__r0r.TrPvsDr0rUdHello)objectxyr&r)r'r*__dict__)r+rUtt2rLs     r.test_newstyle_classz"XMLRPCTestCase.test_newstyle_classus								
ACC"!)>)>??"QZ(((((r0cZ|ttjddzfdS)Nrc)assertRaises
OverflowErrorr&r'r+s r.test_dump_big_longz!XMLRPCTestCase.test_dump_big_long~s(-1b5(CCCCCr0cX|ttjddifdS)Nrrrra	TypeErrorr&r'rcs r.test_dump_bad_dictz!XMLRPCTestCase.test_dump_bad_dicts()Y_|oFFFFFr0cgd}ddd|g}|||ttj|fdS)Nrfrg)appendrarir&r')r+lr\s   r.test_dump_recursive_seqz&XMLRPCTestCase.test_dump_recursive_seqsIGG
q1I	)Y_qd;;;;;r0crddd}d|d}||d<|ttj|fdS)Nr)12rg)3rJr\rhr+rJr\s   r.test_dump_recursive_dictz'XMLRPCTestCase.test_dump_recursive_dictsCNNNN#)Y_qd;;;;;r0ctjdkr4|ttjt
dft	jtjtjf|ttjtjdzf|ttjtjdz
fd}t	j	}|
tj||
tj||t|j
tjdz||t|j
tjdz
|dS)NircdSNrTr=s r.dummy_writez5XMLRPCTestCase.test_dump_big_int.<locals>.dummy_writeDr0)sysmaxsizerarbr&r'intMAXINTMININT
Marshallerdump_intr+r|r?s   r.test_dump_big_intz XMLRPCTestCase.test_dump_big_intsZ;  mY_"5zzm
-
-
-	)9+;<===-$+A-/	1	1	1-$+A-/	1	1	1			
 ""	

9#[111	

9#[111-#*1,k	;	;	;-#*1,k	;	;	;	;	;r0ctjtdftjttjttjftjttjdzttjdz
fd}tj}|tj||tj||tjdz||tjdz
|dS)Nrx*cdSrzrTr{s r.r|z4XMLRPCTestCase.test_dump_double.<locals>.dummy_writer}r0)r&r'floatrrrdump_doublers   r.test_dump_doublezXMLRPCTestCase.test_dump_doublesw)***y/00y/002	3	3	3y/"455y/"4557	8	8	8			
 ""	

i&444	

i&444	

i&+[999	

i&+[99999r0ctdgz}tdgzf}tj|d}||tj|dd|ttj|fdS)NT)
allow_noner)r(r&r'r*r)rari)r+rHarg1strgs    r.test_dump_nonezXMLRPCTestCase.test_dump_nones t555#/$//215	7	7	7)Y_tg>>>>>r0cfddi}tj|fd}d|z}|tj|dd||dd}|tj|dd|tj|fdd	}|tj|dd||dd}|tj|dd|d
}tj|fd|}|tj|dd||tj|d|dS)
Nukey€¤u
value€¤iso-8859-15encodingz,<?xml version='1.0' encoding='iso-8859-15'?>rxmlcharrefreplaceT)rrFumethod€¤)r
methodnamer)r&r'r*r)encode)r+rHrrs    r.test_dump_encodingz!XMLRPCTestCase.test_dump_encodings "$x-@@@=D..q1!4e<<<{{=*=>>..q1!4e<<<x-.2444..q1!4e<<<{{=*=>>..q1!4e<<<'
x-*4666..q1!4e<<<..q1:>>>>>r0cd}||tj|tttjfD]}||}tj|f}tj|d\}}|\}||||t|t|	|tj|d\}}|\}||||t|tj|	|
dS)Nr
Tr2F)
r*r&Binarybytes	bytearrayr'r)r8r9r:)r+sampletype_rHr=r>r?newvalues        r.test_dump_byteszXMLRPCTestCase.test_dump_bytess5$!1&!9!9:::Iy'77	!	!EE&MME))A!TBBBIFA KXXv...MM$x..%000a   !UCCCIFA KXXv...MM$x..)*:;;;a    	!	!r0ctj}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))r+rdatas   r.test_loads_unsupportedz%XMLRPCTestCase.test_loads_unsupportedsu!/
G-$???4	
-$???5	
-$?????r0cd|z}tj|fi|\}}|\}||||t	|t	|||dS)Nz1<params><param><value>%s</value></param></params>)r&r)r*r8r9r:)r+r=rHkwargsr,r>r?rs        r.check_loadszXMLRPCTestCase.check_loadss~BQFOD33F33	5)))

d8nnd5kk222!r0c|j}|dd|dd|dd|dd|dd|d	d|d
d|dd
|dtjd|ddd|dtjd|dt	jddddddd|dddg|dddddS)Nstringz<string>string</string>u4<string>𝔘𝔫𝔦𝔠𝔬𝔡𝔢 string</string>u#𝔘𝔫𝔦𝔠𝔬𝔡𝔢 stringz<int>2056183947</int>izz<int>-2056183947</int>iuqz<i4>2056183947</i4>z<double>46093.78125</double>g@z<boolean>0</boolean>Fz%<base64>AGJ5dGUgc3RyaW5n/w==</base64>s
byte stringTr2z6<dateTime.iso8601>20050210T11:41:23</dateTime.iso8601>rrrrrrrzR<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>)ab)rr&rr7r6r+checks  r.test_load_standard_typesz'XMLRPCTestCase.test_load_standard_typess 
h!!!
'222
DFklll
%z222
&444
#Z000
,k:::
$e,,,
5566	8	8	8
5$	>	>	>	>
F !455	7	7	7
FaRR88 $	&	&	&	&	 "#Q	)	)	)	"#++	-	-	-	-	-r0c|j}|dd|dd|dd|dd|dd|d	d
|dd|d
tjddS)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)rdecimalDecimalrs  r.test_load_extension_typesz(XMLRPCTestCase.test_load_extension_typess 
h
k4   
nc"""
&&&
#Z000
="	$	$	$
'222
>o566	8	8	8	8	8r0c|j}d}tj|5d|dzz}|t5|d|dddddn#1swxYwY|t5|d|dddddn#1swxYwYddddS#1swxYwYdS)Nirrrz<int>z</int>z<biginteger>z
</biginteger>)rradjust_int_max_str_digitsra
ValueError)r+r	maxdigitsr=s    r.test_limit_intzXMLRPCTestCase.test_limit_int$s 	

.y
9
9	=	=y1}%A"":..
/
/'a'''...
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/"":..
=
=5Q555t<<<
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=		=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=sY#B8AB8A"	"B8%A"	&B8B B8 B$	$B8'B$	(B88B<?B<ctj}||dddgifdS)Nz
user@host.tldzhost.tld)
AuthorizationzBasic dXNlcg==)xmlrpcclient	Transportr*
get_host_info)r+transps  r.test_get_host_infoz!XMLRPCTestCase.test_get_host_info.s]((**--o>>%?@"F	G	G	G	G	Gr0c.	ddl}d}n#t$rd}YnwxYw	tjddS#t$r||dYdSt$r|	|YdSwxYw)NrTFzhttps://localhost:9999z&xmlrpc client's error with SSL support)
sslImportErrorrrServerProxybad_functionNotImplementedErrorassertFalseOSError
assertTrue)r+rhas_ssls   r.test_ssl_presencez XMLRPCTestCase.test_ssl_presence5s	JJJGG			GGG		%M%%&>??LLNNNNN"	P	P	PW&NOOOOOO	%	%	%OOG$$$$$$	%s#	1A B2BBcvGddtjj}fd}tjtjdf||jtj	|}|
||jdjj
}tj|5}||d||dddddS#1swxYwYdS)Nc"eZdZdZdZdZdZdS)@XMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandlerHTTP/1.1Fct|jd}|j||jr	d|_dStjdd}|	}|
tjj
|dt|||j|d|_d|_dS)NContent-LengthT)rmrEF)rheadersgetrfilereadhandledclose_connectionr&r'r
send_responsehttp
HTTPStatusOKsend_headerlenend_headerswfilewrite)r+lengthresponses   r.do_POSTzHXMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandler.do_POSTHsT\--.>??@@
'''<,0D)F$?4EEE#??,,""4?#5666  !13x==AAA  """
  ***#(-%%%r0cdSrzrT)r+formatargss   r.log_messagezLXMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandler.log_messageWsr0N)rQrRrSprotocol_versionrrrrTr0r.RequestHandlerrDs=)G

.

.

.




r0rcjtddSNr)socket
settimeoutrhandle_request)serversr.
run_serverz<XMLRPCTestCase.test_keepalive_disconnect.<locals>.run_server[sIM$$U1XX...!!###!!#####r0r)targetz
http://{}:{}/rm)rrBaseHTTPRequestHandler
HTTPServerrHOST
addCleanupserver_close	threadingThreadstartjoinrserver_addressr&rr*method)r+rrthreadurlprs      @r.test_keepalive_disconnectz(XMLRPCTestCase.test_keepalive_disconnectCsu					T[?			.	$	$	$	$	$
'');Q(?PP+,,,!444$$$$o$f&;<

"3
'
'	,1QXXZZ+++QXXZZ+++	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,sAD..D25D2N)rQrRrSr/rArCrMr^rdrjrprvrrrrrrrrrrrrrrTr0r.r$r$0sk,,,
D$&&&)))DDDGGG<<<<<<;;;,::: ??????*!!!&@@@---6888===GGG%%%%,%,%,%,%,r0r$cNeZdZGddeZdZdZdZdZdZ	dZ
d	S)
SimpleXMLRPCDispatcherTestCaseceZdZdZdS)*SimpleXMLRPCDispatcherTestCase.DispatchExczSRaised inside the dispatched functions when checking for
        chained exceptionsN)rQrRrS__doc__rTr0r.DispatchExcrls				r0rcd}fd}tj}||j5}|d|dddn#1swxYwY|jj	|f
|jj
|jjdS)z$Calls explicitly registered functionrfc.|rz)r)paramsr+s r.dispatched_funczQSimpleXMLRPCDispatcherTestCase.test_call_registered_func.<locals>.dispatched_funcws""6***r0rN)
rrSimpleXMLRPCDispatcherregister_functionrar	_dispatchr*	exceptionrr:	__cause____context__)r+
exp_paramsr
dispatcherexc_ctxs`    r.test_call_registered_funcz8SimpleXMLRPCDispatcherTestCase.test_call_registered_funcps4

	+	+	+	+	+]99;;
$$_555


t/
0
0	@G  !2J???	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@*/*???'+5666'+788888sA99A=A=cd}Gdd}tj}||||j5}|d|dddn#1swxYwY||jj	|f|
|jj|
|jjdS)z3Calls a registered instance attribute as a functionrfceZdZdZdS)OSimpleXMLRPCDispatcherTestCase.test_call_instance_func.<locals>.DispatchedClassc6t|rzrr)r+r
s  r.rz_SimpleXMLRPCDispatcherTestCase.test_call_instance_func.<locals>.DispatchedClass.dispatched_funcs4@@HHHr0N)rQrRrSrrTr0r.DispatchedClassrs(
I
I
I
I
Ir0rrN
rrrregister_instancerarrr*rrr:rr)r+rrrrs     r.test_call_instance_funcz6SimpleXMLRPCDispatcherTestCase.test_call_instance_funcsR

	I	I	I	I	I	I	I	I]99;;
$$__%6%6777


t/
0
0	@G  !2J???	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@*/*???'+5666'+788888s%BBBcd}d}Gdd}tj}||||j5}|||dddn#1swxYwY||jj	||f|
|jj|
|jjdS)z4Calls the registered instance's `_dispatch` functionrrfceZdZdZdS)LSimpleXMLRPCDispatcherTestCase.test_call_dispatch_func.<locals>.TestInstancec8t||rzr)r+rr
s   r.rzVSimpleXMLRPCDispatcherTestCase.test_call_dispatch_func.<locals>.TestInstance._dispatchs4@@F$$$r0N)rQrRrSrrTr0r.TestInstancer!s#
$
$
$
$
$r0r#Nr)r+
exp_methodrr#rrs      r.test_call_dispatch_funcz6SimpleXMLRPCDispatcherTestCase.test_call_dispatch_funcs?


	$	$	$	$	$	$	$	$
]99;;
$$\\^^444


t/
0
0	9G  Z888	9	9	9	9	9	9	9	9	9	9	9	9	9	9	9*/*j1IJJJ'+5666'+788888s'B

BBctj}|dd|t
d5|ddddddS#1swxYwYdS)z2Calls explicitly registered function which is NoneNrnameparam)rrrr
assertRaisesRegex	Exceptionrr+rs  r.test_registered_func_is_nonez;SimpleXMLRPCDispatcherTestCase.test_registered_func_is_nones]99;;
$$T$999

#
#Ix
8
8	7	7  :666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7sA55A9<A9ctj}|t	|td5|ddddddS#1swxYwYdS)z>Attempts to call nonexistent function on a registered instancerr)N)rrrrrXr+r,rr-s  r.test_instance_has_no_funcz8SimpleXMLRPCDispatcherTestCase.test_instance_has_no_funcs]99;;
$$VXX...

#
#Ix
8
8	7	7  :666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7sA??BBctj}|td5|ddddddS#1swxYwYdS)z2Calls a function that the dispatcher cannot locaterr)N)rrrr+r,rr-s  r.test_cannot_locate_funcz6SimpleXMLRPCDispatcherTestCase.test_cannot_locate_funcs]99;;


#
#Ix
8
8	7	7  :666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7sAA"%A"N)rQrRrSr,rrrr%r.r0r2rTr0r.rrksi999$999&999*77777777777r0rceZdZdZdS)HelperTestCasec|tjdd|tjdd|tjdddS)Nza&bza&amp;bza<bza&lt;bza>bza&gt;b)r*r&escapercs r.test_escapezHelperTestCase.test_escapesk)%00)<<<)%00(;;;)%00(;;;;;r0N)rQrRrSr7rTr0r.r4r4s#<<<<<r0r4c eZdZdZdZdZdS)
FaultTestCasectjdd}|t|d|t|t	|dS)Nr
Test Faultz<Fault 42: 'Test Fault'>)r&Faultr*reprrI)r+fs  r.	test_reprzFaultTestCase.test_reprsXOB--a"<===a#a&&)))))r0ctjdd}tj|f}tj|\\}}||ddd||dtj|}|tjtj|dS)Nrr;)	faultCodefaultString)r&r<r'r)r*rra)r+r>r=newfr?s     r.test_dump_faultzFaultTestCase.test_dump_faultsOB--OQD!!_Q''
RMMNNND!!! ""((++)/9?A>>>>>r0c|ttjjt
d|tjt
ddSN__addtitle)raAttributeErrorrrresolve_dotted_attributerIrrcs r.test_dotted_attributez#FaultTestCase.test_dotted_attributesW	
. -@#w	P	P	P
>>sGLLMMMMMr0N)rQrRrSr?rDrKrTr0r.r9r9sF***
???NNNNNr0r9c>eZdZdZdZdZdZdZdZdZ	dZ
d	S)
DateTimeTestCasecRtjd5}tjgd}||_tj}t
j}|t|tj
d|ddddS#1swxYwYdS)Nztime.localtime)	ir1rr%Y%m%dT%H:%M:%S)rpatchtimestruct_timereturn_value	localtimer&r7r*rIstrftime)r+localtime_mocktime_structrYr\s     r.test_defaultzDateTimeTestCase.test_defaults
Z(
)
)	J^*33355K*5N'((I"$$ASVV!]+<iHH
J
J
J
	J	J	J	J	J	J	J	J	J	J	J	J	J	J	J	J	J	JsA:BB #B c	d}tj|}|t|t	jdt	j|dSNgl]ޮArT)r&r7r*rIrVrZrYrus   r.	test_timezDateTimeTestCase.test_times`q!!Q'8$.:K:KLL	N	N	N	N	Nr0cxd}tj|}|t|ddS)N)		r&2rmrz20070609T10:38:50)r&r7r*rIrus   r.test_time_tuplez DateTimeTestCase.test_time_tuples:'q!!Q!455555r0ctjd}tj|}|t|tjd|dSr_)rVrYr&r7r*rIrZrus   r.test_time_structz!DateTimeTestCase.test_time_structsQN,--q!!Q/@!!D!DEEEEEr0ctjdddddd}tj|}|t	|ddS)Nrbrrrgrlrmz20070102T03:04:05)r6r&r7r*rIrus   r.test_datetime_datetimez'DateTimeTestCase.test_datetime_datetimesOd1Qq1--q!!Q!455555r0ctjdddddd}tj|}dt|z}|t||dS)Nrbrrrgrlrmz%<DateTime '20070102T03:04:05' at %#x>)r6r&r7idr*r=)r+rJr\vals    r.r?zDateTimeTestCase.test_reprs^d1Qq1--q!!
4r!uu
<a#&&&&&r0c
0d}tj}||tjtjdddddd}|||tj|}|||dS)Nz 20070908T07:11:13  rbrdrOr
)r&r7decoder6r*	_datetime)r+rJt1trefr]s     r.test_decodezDateTimeTestCase.test_decodes"


!
!
		!!("3D1Qr""E"EFFT"""

 
#
#T"""""r0cDtj}tj|}|||k|||k|tjdz}|||k|||k|d}|||k|||ktj|}|||k|||k|d}|}|	|dk|||k|	|t|k|||k|t5|tdkdddn#1swxYwY|t5||kdddn#1swxYwY|t5|t|kdddn#1swxYwY|t5||kdddn#1swxYwY||tk|	|tk||tk|	|tk||tk|	|tk|	|t k||t k|	|t k||t kdS)Nrl)secondsrTasciii)r6nowr&r7	timetupler	timedeltarZrrrrarirrr	r
)r+r{dtimethendstr
dtime_thendbytesdtuples        r.test_comparisonz DateTimeTestCase.test_comparisons}##%%"3==??33	
%%%u%%%X'2222
&&&%%%||-..
&&&
&&&'(8(899

d*+++z)***W%%$'''((()F"3"33444(((


y
)
)	 	 E$KK	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 


y
)
)		FNN															


y
)
)	'	'Yv&&&&	'	'	'	'	'	'	'	'	'	'	'	'	'	'	'


y
)
)		VOO																
*+++)+,,,((()))()))')***)***()))(*+++)*****sHH44H8;H8I,,I03I0J11J58J5K))K-0K-N)rQrRrSr]r`rhrjrlr?rwrrTr0r.rMrMsJJJNNN666
FFF
666
'''###,+,+,+,+,+r0rMc eZdZdZdZdZdS)BinaryTestCasecrtj}|t|ddS)Nr&rr*rI)r+r\s  r.r]zBinaryTestCase.test_defaultEs2Q$$$$$r0cd}tj|}|t|t|ddSNsabc123zlatin-1rrus   r.test_stringzBinaryTestCase.test_stringIsC)QQQ	!2!233333r0cnd}tj|}tj}|||t
|t
|dtj|}|t
|t
|ddSr)base64encodebytesr&rrsr*rI_binary)r+rJderur]s     r.rwzBinaryTestCase.test_decodeNs)


"
"




		"


R#a"3"3444

r
"
"R#a"3"344444r0N)rQrRrSr]rrwrTr0r.rr>sA%%%444
55555r0rcGdd}Gddtjj}|stjj}|d||dd}	||j\aadttfza	|
|||
t|
d	d
|j
d}|
d
d}|}	||	d||dkr||dz}|dkn#t$$rYnwxYw|jda|dS#|jda|wxYw)Nc4eZdZdZdZGddZdS)&http_server.<locals>.TestInstanceClassc||zSrzrTr+rYrZs   r.divz*http_server.<locals>.TestInstanceClass.div`6Mr0c|dkrdSdSNrThis is the div functionrTr+r(s  r._methodHelpz2http_server.<locals>.TestInstanceClass._methodHelpcu}}11}r0c$eZdZedZdS).http_server.<locals>.TestInstanceClass.FixturecdS)N42rTrTr0r.getDataz6http_server.<locals>.TestInstanceClass.Fixture.getDatahstr0N)rQrRrSstaticmethodrrTr0r.Fixturergs-


\


r0rN)rQrRrSrrrrTr0r.TestInstanceClassr_sZ				2	2	2										r0rceZdZdZdS)#http_server.<locals>.MyXMLRPCServercl|j\}}|d||fSNTracceptsetblockingr+r=ports   r.get_requestz/http_server.<locals>.MyXMLRPCServer.get_requestm6k((**GAt
MM$d7Nr0NrQrRrSrrTr0r.MyXMLRPCServerrl#					r0r	localhostrF)rlogRequestsbind_and_activatehttp://%s:%dc|SrzrT)rYs r.<lambda>zhttp_server.<locals>.<lambda>sr0têštcdSThis is my functionTrTrTr0r.my_functionz http_server.<locals>.my_functions	4r0addr'c||zSrzrTrYrZs  r._zhttp_server.<locals>._sq5Lr0T)allow_dotted_namesrr)rrSimpleXMLRPCServerSimpleXMLRPCRequestHandlerserver_bindrgetsocknameADDRPORTURLserver_activate register_introspection_functionsregister_multicall_functionsr
powrsetrTimeoutErrorclose)
evtnumrequestsrequestHandlerrrrservrrtestInstances
          r.http_serverr^sa9BA>*N#+&+uFFFD#[,,..
d
dD\)--///))+++s###{{H555	
			
 		
		U		+	+		
,	+	((**|EEE			Aoo!!!1KAoo



	
						
				s+D7FG
FGFG1G9cGdd}d}Gddtjj}|stjj}Gdd|}Gdd	}|d
|dd}|jd
|	|j\aa	dttfza
|gd}	|	D]u}
||
tj
}||||
fddv||	dt$||	ddd|d|||dkr||dz}|dkn#t*$rYnwxYw|jda	|dS#|jda	|wxYw)NceZdZdZdZdS),http_multi_server.<locals>.TestInstanceClassc||zSrzrTrs   r.rz0http_multi_server.<locals>.TestInstanceClass.divrr0c|dkrdSdSrrTrs  r.rz8http_multi_server.<locals>.TestInstanceClass._methodHelprr0N)rQrRrSrrrTr0r.rrs2				2	2	2	2	2r0rcdSrrTrTr0r.rz&http_multi_server.<locals>.my_functionstr0ceZdZdZdS))http_multi_server.<locals>.MyXMLRPCServercl|j\}}|d||fSrrrs   r.rz5http_multi_server.<locals>.MyXMLRPCServer.get_requestrr0NrrTr0r.rrrr0rceZdZgZdS)+http_multi_server.<locals>.MyRequestHandlerN)rQrRrS	rpc_pathsrTr0r.MyRequestHandlerrs			r0rceZdZddZdS)+http_multi_server.<locals>.BrokenDispatcherNc td)Nzbroken dispatcher)RuntimeError)r+rdispatch_methodpaths    r._marshaled_dispatchz?http_multi_server.<locals>.BrokenDispatcher._marshaled_dispatchs2333r0NN)rQrRrSrrTr0r.BrokenDispatcherrs(	4	4	4	4	4	4r0rrF)rrrgr)
/foo/foo/bar/foo?k=v	/foo#frag
/foo?k=v#fragr//RPC2?k=v#fragc|SrzrT)rs r.rz#http_multi_server.<locals>.<lambda>sqr0testrrc||zSrzrTrs  r.rz#http_multi_server.<locals>.<lambda>s
AaCr0r
/is/broken)rrMultiPathXMLRPCServerrrrrrrrrradd_dispatcherrrrr
get_dispatcherrrrrr)rrrrrrrrrpathsrrJs            r.http_multi_serverrs22222222<BA>44444444>*,<&+uFFFDK1"[,,..
d
dD\)



	:	:D##D&-*N*N*P*PQQA
..000
**,,,
 0 0 0&9999E!H%%77<<<E!H%%77OOOL*:*:*<*<===			Aoo!!!1KAoo



	
						
				s+E7HI
HIHI1Jc	|jdks|jdS|jd}n#t$rt	|}YnwxYw|rd|vrdSdSdS)zReturns 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.rNTX-exceptionztemporarily unavailable)errcoderrrIrIlower)eexc_messs  r.is_unavailable_exceptionrs9??ai/49==//q66-1A1AAAtAAs11A
A
c|sdSfd}|S)Nc|SrzrT)funcs r.rz)make_request_and_skipIf.<locals>.<lambda>sDr0cfd}|S)Nc	tjtn3#tjt
f$r}t
|sYd}~nd}~wwxYwtjrz)	r&rrr
ProtocolErrorrrunittestSkipTest)r+rreasons  r.make_request_and_skipzImake_request_and_skipIf.<locals>.decorator.<locals>.make_request_and_skips
%c**668888+W5


/22
#F+++s+/AAArT)rrrs  r.	decoratorz*make_request_and_skipIf.<locals>.decorators$	,	,	,	,	,%$r0rT)	conditionrrs ` r.make_request_and_skipIfrs7!   %%%%%r0c8eZdZdZdZeeZdZdZ	dS)BaseServerTestCaseNrcdtjj_t	j|_|j|j|jf}t	j	|j
|}|||j
|j|jdS)NTrr)rrr_send_traceback_headerrEventr
request_countrr
threadFuncrrrwaitclearr+	serv_argsrs   r.setUpzBaseServerTestCase.setUpsBF
(??$$Xt143FG	!yIII$$$	


r0cd|jdtjj_dSNF)rrrrrrrcs r.tearDownzBaseServerTestCase.tearDowns(

CH
(???r0)
rQrRrSrrrrrr"r%rTr0r.rrsPNMk**J


HHHHHr0rceZdZdZdZdZdZdZdZdZ	e
ejj
dkd	d
ZdZdZd
ZdZdZdZdZdZdZdS)SimpleServerTestCasec
R	tjt}||ddddS#tjtf$rI}t|s/||dt|ddYd}~dSYd}~dSd}~wwxYw)Nrcrq
rr)
r&rrr*rrrrfailgetattrr+rrs   r.test_simple1z!SimpleServerTestCase.test_simple1#s	E%c**AQUU1QZZ.....'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsAAB&8B!!B&c
`d}d}	tjt}||||||zdS#tjtf$rI}t|s/||dt|ddYd}~dSYd}~dSd}~wwxYw)NuPŷtuhơnr*rr)
r&rrr*rrrrr+r,r+start_string
end_stringrrs     r.
test_nonasciiz"SimpleServerTestCase.test_nonascii-sC;
	E%c**AQUU<<<)J6
8
8
8
8
8'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsAAB-$8B((B-c
nd}d}	tjtd}||||||zdS#tjtjf$rI}t|s/|	|dt|ddYd}~dSYd}~dSd}~wwxYw)N€¤rrr*rrr&rrr*rrrerrorrr+r,r0s     r.test_client_encodingz)SimpleServerTestCase.test_client_encoding:s
	E%cMBBBAQUU<<<)J6
8
8
8
8
8'6	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsAAB4+8B//B4c
^	tjtd}||dddS#tjtjf$rI}t|s/|	|dt|ddYd}~dSYd}~dSd}~wwxYw)Nrzrrr*rr)r&rrr*têštrrr8rr+r,r-s   r.test_nonascii_methodnamez-SimpleServerTestCase.test_nonascii_methodnameHs	E%cG<<<AQXXb\\2.....'6	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsAAB,#8B''B,cntjtjt
t5}|dd|}dddn#1swxYwY|	|j
d|	|jddS)NPOSTz/this-is-not-validiz	Not Found)
contextlibclosingrrHTTPConnectionrrrequestgetresponser*statusr)r+connrs   r.test_404zSimpleServerTestCase.test_404Rs
 : :4 F F
G
G	*4LL!5666''))H	*	*	*	*	*	*	*	*	*	*	*	*	*	*	*	
#...+66666s+A44A8;A8c
tgd}	tjt}|j}|t||dS#tjtf$rI}t|s/|
|dt|ddYd}~dSYd}~dSd}~wwxYw)N)
rrrrrzsystem.listMethodszsystem.methodHelpzsystem.methodSignaturezsystem.multicallrr*rr)rr&rrsystemlistMethodsr*rrrr+r,)r+expected_methodsrmethrs     r.test_introspection1z(SimpleServerTestCase.test_introspection1\s	 + + +,,	E%c**A8''))DSYY(899999'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsAA**C	8CC	c
^	tjt}|jd}||ddS#tjtf$rI}t|s/|	|dt|ddYd}~dSYd}~dSd}~wwxYw)Nrrr*rrr&rrrH
methodHelpr*rrrr+r,)r+rdivhelprs    r.test_introspection2z(SimpleServerTestCase.test_introspection2ls		E%c**Ah))%00GW&@AAAAA'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EA	A

B,#8B''B,rz)Docstrings are omitted with -O2 and abovec
^	tjt}|jd}||ddS#tjtf$rI}t|s/|	|dt|ddYd}~dSYd}~dSd}~wwxYw)Nrrr*rrrN)r+r
myfunctionrs    r.test_introspection3z(SimpleServerTestCase.test_introspection3xs		E%c**A,,];;JZ)>?????'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	ErRc
^	tjt}|jd}||ddS#tjtf$rI}t|s/|	|dt|ddYd}~dSYd}~dSd}~wwxYw)Nrzsignatures not supportedr*rr)r&rrrHmethodSignaturer*rrrr+r,)r+rdivsigrs    r.test_introspection4z(SimpleServerTestCase.test_introspection4s	E%c**AX--e44FV%?@@@@@'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	ErRc
J	tjt}tj|}|dd|dd|dd|\}}}||d||d||ddS#tjtf$rI}t|s/||d	t|d
dYd}~dSYd}~dSd}~wwxYw)Nrrgrcrqrrmr)r*rr)
r&rr	MultiCallrrrr*rrrr+r,)r+r	multicall
add_result
pow_result
div_resultrs       r.test_multicallz#SimpleServerTestCase.test_multicallsZ	E%c**A!+A..IMM!AMM!AMM#b!!!1:.J
JZ---Z...Z11111'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsB?CD"8DD"c
	tjt}tj|}||}||jddd||jddddS#tjtf$rI}t|s/|
|dt|ddYd}~dSYd}~dSd}~wwxYw)	NrrArrBz@<class 'Exception'>:method "this_is_not_exists" is not supportedr*rr)r&rrr\this_is_not_existsr*resultsrrrr+r,)r+rr]r>rs     r.test_non_existing_multicallz0SimpleServerTestCase.test_non_existing_multicalls<	E%c**A!+A..I((***Y[[F
V^A.{;Q???V^A.}=#
$
$
$
$
$'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsBBC<38C77C<c|ttjjt
d|tjt
d|dSrF)rarIrrrJrIrr.rcs r.rKz*SimpleServerTestCase.test_dotted_attributesk. -@#w	P	P	P	

>>sGLLMMM	
r0ctjdttfz}|j}||ddS)Nhttp://%s:%d/RPC2r)r&rrrrrr*)r+rrs   r.test_allow_dotted_names_truez1SimpleServerTestCase.test_allow_dotted_names_truesK&':dD\'IJJ~%%''t$$$$$r0ctjdttfz}||ddddS)Nrhréuaé)r&rrrr*rr+rs  r.test_unicode_hostz&SimpleServerTestCase.test_unicode_hostsF&':dD\'IJJC00':::::r0ctjtjtt
f5}|dtdt
ddddddS#1swxYwYdS)Nz@POST /RPC2 HTTP/1.0
Content-Length: 100

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

rz)r?r@rcreate_connectionrrsendr)r+rEs  r.test_partial_postz&SimpleServerTestCase.test_partial_posts

 8$ F F
G
G	C4II2 $22'+222
39&//
C
C
C	C	C	C	C	C	C	C	C	C	C	C	C	C	C	C	C	C	Cs:A::A>A>c$tjt5}|dd||djddddn#1swxYwY||djddS)Nrrg	transportr)r&rrrassertNotEqual_connectionr*rls  r.test_context_managerz)SimpleServerTestCase.test_context_managers

"3
'
'	.6JJq!{ 3 3 ? ,
.
.
.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	
,,8%	'	'	'	'	's;A!!A%(A%c
	tjt5}|dddddn#1swxYwYn#tj$rYnwxYw||djddS)Nrrrtr)r&rrrr<r*rvrls  r.!test_context_manager_method_errorz6SimpleServerTestCase.test_context_manager_method_errors	&s++
#v

1c"""
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#			D	,,8%	'	'	'	'	's1A
>A
AA
AA

AAN)rQrRrSr.r3r9r<rFrLrQrr~flagsoptimizerUrYrarerKrirmrrrwryrTr0r.r'r'"scEEEEEEEEEEEE777
E
E
E 
E
E
ESY/14@BB
E
EBB
EEEEEEE"EEE*%%%;;;CCC''''''''r0r'c,eZdZeddZdZdS)SimpleServerEncodingTestCaseNc*t|||ddS)Nr)r)rrrrs    r.rz'SimpleServerEncodingTestCase.threadFuncsCnmDDDDDr0c
jd}d}	tjt}||||||zdS#tjtjf$rI}t|s/|	|dt|ddYd}~dSYd}~dSd}~wwxYw)Nr5r6r*rrr7r0s     r.test_server_encodingz1SimpleServerEncodingTestCase.test_server_encodings
	E%c**AQUU<<<)J6
8
8
8
8
8'6	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsAAB2)8B--B2r)rQrRrSrrrrTr0r.r}r}sJEEE\EEEEEEr0r}ceZdZeeZdZdZdZe	j
ddZe	j
ddZe	j
ddZ
e	j
ddZe	j
dd	Ze	j
dd
Ze	j
ddZe	j
ddZe	j
dd
ZdS)MultiPathServerTestCaserctjtdz}||ddd|tj|jdddS)Nrrcrqr))r&rrr*rrar<rr+rs  r.
test_path1z"MultiPathServerTestCase.test_path1s\!#f*--qT***)/15!Q77777r0ctjtdz}||ddd|tj|jdddS)Nrrcrq)r&rrr*rrar<rrs  r.
test_path2z"MultiPathServerTestCase.test_path2s\!#j.11qS))))/15!Q77777r0walltimectjtdz}|tj|jdddS)Nrrcrqr&rrrar<rrs  r.
test_path3z"MultiPathServerTestCase.test_path3
s;!#l"233)/15!Q77777r0ctjtdz}|tj|jdddS)Nz/invalidrcrqrrs  r.test_invalid_pathz)MultiPathServerTestCase.test_invalid_paths:!#j.11)/15!Q77777r0ctjtdz}||ddS)Nrr&rrr*rrs  r.test_path_query_fragmentz0MultiPathServerTestCase.test_path_query_fragments;!#o"566?33333r0ctjtdz}||ddS)Nrrrs  r.test_path_fragmentz*MultiPathServerTestCase.test_path_fragments:!#k/22;/////r0ctjtdz}||ddS)Nrrrs  r.test_path_queryz'MultiPathServerTestCase.test_path_querys:!#j.11:.....r0ctjt}||ddS)Nrrrs  r.test_empty_pathz'MultiPathServerTestCase.test_empty_path#s6!#&&7+++++r0ctjtdz}||ddS)Nrrrs  r.test_root_pathz&MultiPathServerTestCase.test_root_path(s:!#),,3'''''r0ctjtdz}||ddS)Nrrrs  r.test_empty_path_queryz-MultiPathServerTestCase.test_empty_path_query-s:!#,//6*****r0ctjtdz}||ddS)Nrrrs  r.test_empty_path_fragmentz0MultiPathServerTestCase.test_empty_path_fragment2s:!#-007+++++r0N)rQrRrSrrrrrrrrequires_resourcerrrrrrrrrrTr0r.rrs/00JM888
888
Wz**88+*8Wz**88+*8Wz**44+*4Wz**00+*0Wz**//+*/Wz**,,+*,Wz**((+*(Wz**+++*+Wz**,,+*,,,r0rcHeZdZGddejjZeZdZdS)BaseKeepaliveServerTestCasec:eZdZejjZdZgZdZ	dZ
dS)*BaseKeepaliveServerTestCase.RequestHandlerrc|jgt|jdz
|_|j|Sr)
myRequestsrnrreqidxparentClasshandlercs r.rz1BaseKeepaliveServerTestCase.RequestHandler.handleAsEO""2&&&do..q0DK#**4000r0c|j|}|j|j|j|Srz)rhandle_one_requestrrrnraw_requestline)r+r>s  r.rz=BaseKeepaliveServerTestCase.RequestHandler.handle_one_requestEs=%88>>FODK(//0DEEEMr0N)rQrRrSrrrrrrrrrTr0r.rr=sGm>%
	1	1	1					r0rcNg|j_t|Srz)rrrr"rcs r.r"z!BaseKeepaliveServerTestCase.setUpKs!)+&!''---r0N)	rQrRrSrrrrrr"rTr0r.rr:sYA$N.....r0rceZdZdZdS)KeepaliveServerTestCase1ctjt}||ddd||ddd||ddd|d|t|jjd|t|jjdddS)Nrcrqr)rrrr	r&rrr*rrrrassertGreaterEqualrs  r.test_twoz!KeepaliveServerTestCase1.test_twoSs!#&&qT***qT***qT***'

	
T0;<<a@@@	
D$7$B2$F G GKKKKKr0N)rQrRrSrrTr0r.rrRs(
L
L
L
L
Lr0rceZdZdZdZdZdS)KeepaliveServerTestCase2rctjt}||ddd||ddd||ddd|d||ddd||ddd||ddd|d|t|jjd|t|jjdd|t|jjdddS)Nrcrqr)rrrrrs  r.
test_closez#KeepaliveServerTestCase2.test_closeis!#&&qT***qT***qT***'

qT***qT***qT***'

	
T0;<<a@@@D$7$B2$F G GKKKD$7$B2$F G GKKKKKr0ctjt}||ddd|d||ddd|d|t
|jjddS)Nrcrqr)rtrr)	r&rrr*rrrrrrs  r.test_transportz'KeepaliveServerTestCase2.test_transport|s!#&&qT***	+qT***'

T0;<<a@@@@@r0N)rQrRrSrrrrTr0r.rres?MLLL&AAAAAr0rz
requires gzipceZdZGddejjZeZGddej	Z	dZ
dZdZdZ
d	S)
GzipServerTestCasec0eZdZejjZdZdZdS)!GzipServerTestCase.RequestHandlerrc~t|jd|j_|j|S)Ncontent-length)rr	__class__content_lengthrrrcs r.rz)GzipServerTestCase.RequestHandler.do_POSTs3,/=M0N,O,ODN)#++D111r0N)	rQrRrSrrrrrrrTr0r.rrs3m>%	2	2	2	2	2r0rceZdZdZdZdZdS)GzipServerTestCase.TransportFct|dd|_tj||S)Nrr)r	getheaderresponse_lengthr&rparse_response)r+rs  r.rz+GzipServerTestCase.Transport.parse_responses<!$X%7%78H!%L%L!M!MD &55dHEEEr0c~|jr|ddtj|||S)NzContent-Encodinggzip)	fake_gzip	putheaderr&rsend_content)r+
connectionbodys   r.rz)GzipServerTestCase.Transport.send_contents?~
A$$%7@@@&33D*dKKKr0N)rQrRrSrrrrTr0r.rrs?		F	F	F	L	L	L	L	Lr0rc:t|dSrz)rr"rcs r.r"zGzipServerTestCase.setUps  &&&&&r0c|}d|_tjt|}||ddd|jj}d|_||ddd|jj}|	||k|ddSNrtrcrqr)rr)
rencode_thresholdr&rrr*rrrr)r+r\rrrs     r.test_gzip_requestz$GzipServerTestCase.test_gzip_requestsNN!!#333qT***.qT***.!'

r0cj|}d|_d|_tjt
|}|tjtj	d}|5|
dddddn#1swxYwY|ddS)NTrz\b400\brcrqr)rrrr&rrr+rrecompiler)r+r\rcms    r.test_bad_gzip_requestz(GzipServerTestCase.test_bad_gzip_requestsNN!!#333

#
#I$;$&Jz$:$:<<
		
EE!QKKK															'

s2BBBc|}tjt|}|jj}d|j_||ddd|j}d|j_||ddd|d|j}||j_|	||kdSr)
rr&rrrrr*rrr)r+r\roldrrs      r.test_gzip_responsez%GzipServerTestCase.test_gzip_responsesNN!#333!2/3,qT***
/0,qT***'


/2,!r0N)rQrRrSrrrrrr&rr"rrrrTr0r.rrs22222A222$NLLLLLI'LLL'''


			r0rceZdZdZdS)GzipUtilTestCasecd}d|z}tj|}tj|}|t	||d|dzz}tj|}|td5tj|dddn#1swxYwYtj|ddS)Ni@rz#max gzipped payload length exceededr)
max_decode)r&gzip_encodegzip_decoder*rr+r)r+max_gzip_decoderencodeddecodeds     r.test_gzip_decode_limitz'GzipUtilTestCase.test_gzip_decode_limits
*&'--'00W777!+,'--

#
#J$IKK	+	+!'***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	g"555555s
B++B/2B/N)rQrRrSrrTr0r.rrs#66666r0rc~eZdZGddejjZeZgdZfdZ	dZ
dZdZdZ
d	Zd
ZxZS)HeadersServerTestCasec"eZdZdZfdZxZS)$HeadersServerTestCase.RequestHandlerNcf|j|j_tSrz)rrtest_headerssuperrr+rs r.rz,HeadersServerTestCase.RequestHandler.do_POSTs#*.,DN'77??$$$r0)rQrRrSrr
__classcell__rs@r.rrs=	%	%	%	%	%	%	%	%	%r0r)HostzAccept-EncodingzContent-Typez
User-Agentrc\d|j_tSrz)rrrr"rs r.r"zHeadersServerTestCase.setUps +/(ww}}r0cbt|jt|z}|t|||D].\}}||||/dSrz)sortedstandard_headerslistkeysassertListEqualitemsr*r)r+r
additional
expected_keyskeyrHs      r.assertContainsAdditionalHeadersz5HeadersServerTestCase.assertContainsAdditionalHeadersst4tJOO<M<M7N7NNOO
VGLLNN33]CCC$**,,	6	6JCW[[--u5555	6	6r0ctjtdg}||ddd|jj}||ddidS)NX-Testfoorrcrqr)rrr&rrr*rrrrr+rrs   r.test_headerz!HeadersServerTestCase.test_headersi!#0A/BCCCq!d+++%2,,Wx6GHHHHHr0ctjtddg}||ddd|jj}||ddd	dS)
Nr)
X-Test-Secondbarrrcrqr)rr)rrrrs   r.test_header_manyz&HeadersServerTestCase.test_header_manys!+-EF
H
H
Hq!d+++%2,,>>	@	@	@	@	@r0ctjtg}||ddd|jj}||idS)Nrrcrqr)rrs   r.test_header_emptyz'HeadersServerTestCase.test_header_emptys`!#r222q!d+++%2,,Wb99999r0ctjtd}||ddd|jj}||ddidS)N)rrrcrqr)rrrrs   r.test_header_tuplez'HeadersServerTestCase.test_header_tuple
sf!#/CDDDq!d+++%2,,Wx6GHHHHHr0ctjtddi}||ddd|jj}||ddidS)Nrrrrcrqr))	r&rrrr*rrrrrs   r.test_header_itemsz'HeadersServerTestCase.test_header_itemssv!#%/@/F/F/H/HIIIq!d+++%2,,Wx6GHHHHHr0)rQrRrSrrrrrrr"rrr	rr
rrrs@r.rrs%%%%%A%%%$N666III@@@:::IIIIIIIIIIr0rc eZdZdZdZdZdS)ServerProxyTestCasecRtj|d|_dS)Nzhttp://fake.localhost)rTestCaser"rrcs r.r"zServerProxyTestCase.setUps&%%%+r0ctj|j}||dddS)Nr)r&rrr*rs  r.rzServerProxyTestCase.test_close$s>!$(++7t,,,,,r0ctj}tj|j|}||d|dS)Nrrt)r&rrrr*)r+r\rs   r.rz"ServerProxyTestCase.test_transport(sK!!!$(a888;+++++r0N)rQrRrSr"rrrTr0r.rrsA+++---,,,,,r0rc eZdZdfd	ZxZS)FailingMessageClassNc|}|dkrdSt||S)NrzI am broken)rrr)r+rfailobjrs   r.rzFailingMessageClass.get1s9iikk""" =ww{{3(((r0rz)rQrRrSrrrs@r.rr0s=))))))))))r0rc,eZdZdZdZdZdZdZdS)FailingServerTestCasec>tj|_|jdf}tjt|}|||j|j|j	dS)Nrr)
rrrrrrrrrrr s   r.r"zFailingServerTestCase.setUp9s{?$$XqM	!9EEE$$$	


r0c|jdtjj_tjj}|tjj	_
dSr$)rrrrrrrrHTTPMessagerMessageClass)r+
default_classs  r.r%zFailingServerTestCase.tearDownEs;

BG
(?/
@M
0===r0c
tjjj}||ddtjj_	tjt}||ddddS#t
j	tf$rI}t|s/||dt|ddYd}~dSYd}~dSd}~wwxYw)	NFTrcrqr)r*rr)rrrrr*r&rrrrrrr+r,)r+flagvalrrs    r.
test_basicz FailingServerTestCase.test_basicNs-2I%(((CG
(?	E%c**AQUU1QZZ.....'1	E	E	E+A..
E		aaaIr)B)B)BCDDDDDDDDD
E
E
E
E
E
E	EsAB		C(8C##C(c ttjj_	tjt}|dd|	ddS#t
j
tf$r}t|stt|drj||jddu||jdduYd}~dSYd}~dSYd}~dSd}~wwxYw)NrcrqProtocolError not raisedrrX-traceback)rrrrrr&rrrr+rrrhasattrrrrr-s   r.test_fail_no_infoz'FailingServerTestCase.test_fail_no_info`sD@S
0=
	2%c**A
EE!AJJJ
II011111'1	F	F	F+A..
F71i3H3H
F	

m < < DEEE	

m < < DEEEEEEEEE
F
F
F
F
F
F
F
F
F
F
F
F	Fs/A##D
9A=DD
cNttjj_dtjj_	tjt}|
dd|ddS#tjtf$r}t|sut|drkd}||jd|||jdduYd}~dSYd}~dSYd}~dSd}~wwxYw)	NTrcrqr%rz5invalid literal for int() with base 10: 'I am broken'rr&)rrrrrrrr&rrrr+rrrr'r*rrr)r+rrexpected_errs    r.test_fail_with_infoz)FailingServerTestCase.test_fail_with_infopsY@S
0=CG
(?	2%c**A
EE!AJJJ
II011111'1	J	J	J+A..
J71i3H3H
JV  }!=!=|LLL	

m < <D HIIIIIIIII	
J
J
J
J
J
J
J
J
J
J
J
J	Js/A99D$A>DD$N)rQrRrSr"r%r#r(r+rTr0r.rr8se


NNNEEE$222 22222r0rutf-8c#Ktj}tjtj|t_	tjV|t_dS#|t_wxYw)zhA variation on support.captured_stdout() which gives a text stream
    having a `buffer` attribute.
    rN)r~stdoutio
TextIOWrapperBytesIO)rorig_stdouts  r.captured_stdoutr3s]
*K!"*,,BBBCJ!j 


[
    sAA+c&eZdZdZdZdZdZdS)CGIHandlerTestCasecLtj|_dSrz)rrCGIXMLRPCRequestHandlercgircs r.r"zCGIHandlerTestCase.setUps=88::r0cd|_dSrz)r8rcs r.r%zCGIHandlerTestCase.tearDowns
r0c:tj5}d|d<t|jj5}|jdddn#1swxYwY|d|}|d}d	|dd}|
|d	|
|d
ddddS#1swxYwYdS)NGETREQUEST_METHODrrr rrl400zBad Request)rEnvironmentVarGuardr3r8rrseekrsplitrr*)r+envdata_outrrDmessages      r.test_cgi_getzCGIHandlerTestCase.test_cgi_gets|

*
,
,	5$)C !!$(*;<<<
*'')))
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
MM!]]__F\\^^A&Fhhv||~~ac233GVU+++Wm444	5	5	5	5	5	5	5	5	5	5	5	5	5	5	5	5	5	5s5 DADA	D!A	"B!DDDc|d}tj5}t|jj5}tj5}|||dtt||d<|jdddn#1swxYwYdddn#1swxYwYdddn#1swxYwY|d|}|
tjtj|dd||dd}|t't)jd|dt|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>
        rrCONTENT_LENGTH,z<?xmlzContent-Length: (\d+)r)rr?r3r8rrcaptured_stdinrr@rIrrrrar&r<r)findr*rrsearchgroup)r+rrBrCdata_inrcontents       r.test_cgi_xmlrpc_responsez+CGIHandlerTestCase.test_cgi_xmlrpc_responses;
*
,
,	&
dh&7
8
8
8	&<D

#
%
%	&)0MM$LLOOO$'D		NNC !H##%%%
	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	

a	
)/9?F233KHHHW--../	2F;;AA!DDEELL					sYC"CA#B4(C4B88C;B8<C?C"C	C"C	C""C&)C&N)rQrRrSr"r%rErOrTr0r.r5r5sP;;;555$(((((r0r5c eZdZdZdZdZdS)UseBuiltinTypesTestCasecdg_d}tjdddddd}tj||fd}fd	}tjd
dd
}||||	tjdj\}}	j||gt|tjt|tdS)
Nr
irmfoobarc<j|dSrz)logextend)rr+s r.rWz>UseBuiltinTypesTestCase.test_use_builtin_types.<locals>.foobarsHOOD!!!!!r0T)rrr3r)rYr6r&r'rrrr
rr*rr8r9r)r+expected_bytes
expected_date	marshaledrWhandlermybytesmydates`       r.test_use_builtin_typesz.UseBuiltinTypesTestCase.test_use_builtin_typess*, )$2r2rBB
O^]$CXNN		"	"	"	"	"-66dd7DD!!&)))##I...TX***(NM#BCCC

d6llH$5666

d7mmU+++++r0cztjd}||jdS)NTr2)rrr7rr3)r+r^s  r.*test_cgihandler_has_use_builtin_types_flagzBUseBuiltinTypesTestCase.test_cgihandler_has_use_builtin_types_flags5-77$7OO122222r0ctjdd}|||jdS)NrTr2)rrrrrr3rls  r.,test_xmlrpcserver_has_use_builtin_types_flagzDUseBuiltinTypesTestCase.test_xmlrpcserver_has_use_builtin_types_flagsQ112B"2$$011111r0N)rQrRrSrarcrerTr0r.rQrQsA,,,(33322222r0rQcdtj}tjtjg|RdSrz)rthreading_setupraddModuleCleanupthreading_cleanup)thread_infos r.setUpModulerks3"244K.@O;OOOOOOr0__main__rrz)r,)Hrr6rr~rVrr
xmlrpc.clientrr&
xmlrpc.serverrhttp.clientrhttp.serverrrrr/r?rrtest.supportrrrrr	r
rrrequires_working_socketrrr7r(rr$rr4r9rMrrrrrrrrrr'r}rrrrskipIfrrrrrrrcontextmanagerr3r5rQrkrQmainrTr0r.<module>rvs"







!!!!!!



								""""""&&&&&&))))))5555555555KKKKDDD t,,,,'#%Y%&9::)#)$788)')y)*=>>)y);==)y)))$2r2rBBDD

	
$x,x,x,x,x,X&x,x,x,v	T7T7T7T7T7X%6T7T7T7n<<<<<X&<<<NNNNNH%NNN.\+\+\+\+\+x(\+\+\+~55555X&5556tc
>>>>@DDDDP" HHHHH*HHH6D'D'D'D'D'-D'D'D'NEEEEE#5EEE(8,8,8,8,8,08,8,8,z....."4...0LLLLL:LLL&AAAAA:AAAD//@@@@@+@@0/@F//66666x(660/6&:I:I:I:I:I.:I:I:I|,,,,,(+,,,&)))))$+1)))K2K2K2K2K2H-K2K2K2\	!	!	!	!AAAAA*AAAH22222h/222BPPP
zHMOOOOOs,A11A;:A;