python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_xmlrpc.cpython-312.opt-1.pyc

ΑeQddlZddlZddlZddlZddlZddlZddlmZddlmZ	ddl
ZddlZ
ddl
Z
ddlZ
ddlZddlZddlZddlZddlZddlmZddlmZddlmZddlmZddlmZmZmZ	ddlZej>d	d
ddd
dge	j@dde!dddde	jDde	jDde	jDejdd
dddddgZ#GddejHZ%GddejHZ&Gdd ejHZ'Gd!d"ejHZ(Gd#d$ejHZ)Gd%d&ejHZ*dxa+xa,a-dMd'Z.dNd(Z/d)Z0d*Z1Gd+d,ejHZ2Gd-d.e2Z3Gd/d0e2Z4Gd1d2e2Z5Gd3d4e2Z6Gd5d6e6Z7Gd7d8e6Z8ejredud9Gd:d;e2Z:ejredud9Gd<d=ejHZ;Gd>d?e2Z<Gd@dAejHZ=GdBdCe
jj|Z?GdDdEejHZ@ejdOdFZBGdGdHejHZCGdIdJejHZDdKZEeFdLk(rejyy#e$rdZYpwxYw)PN)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
ZdZdZdZdZdZdZdZdZdZy)XMLRPCTestCasectjtf}tj|}|j	t|ddy)Nr)	xmlrpclibdumpsalistloadsassertEqual)selfdumploads   D/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_xmlrpc.pytest_dump_loadzXMLRPCTestCase.test_dump_load2s8x(t$Q
+ctjdddddd}|j|tjdtj|f}tj
|d	\}}|\}|j|||j
t|tj|j|tj
|d
	\}}|\}|j|||j
t|tj|j|tj
|d\}}|\}|j|||j
t|tj|j|tj
|d
\}}|\}|j|||j
t|tj|j|y)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Y//0CDEOORE"OOA>	#

d5k8#4#45!OOA?	#

d5k9#5#56!OOAD9	#

d5k8#4#45!OOAE:	#

d5k9#5#56!r0cVtjdddddd}|j|tjdtj|f}tj
|d	\}}|\}|j|||j
t|tj|j|tj
|d
	\}}|\}|j|||j
t|tj|j|y)Nrrrrrrz00010210T11:41:23Tr2Fr5r;s      r.test_datetime_before_1900z(XMLRPCTestCase.test_datetime_before_1900Ys


q1b"b"
5Y//0CDEOORE"OOA>	#

d5k8#4#45!OOA?	#

d5k9#5#56!r0c(tj}tjtj|fd\\}}|j	|j
ttj|fd}|j	|ty)NTmethodresponse)r&r7r)r'assertIsInstancevaluestr)r+dnew_ddummyr=s     r.test_bug_1164912zXMLRPCTestCase.test_bug_1164912ksq %OOIOOQD;?-AB%5ekk3/
OOUHT:a%r0cGddt}|}d|_d|_tjtj
|f\\}}|j
||jy)NceZdZy)-XMLRPCTestCase.test_newstyle_class.<locals>.TN)__name__
__module____qualname__r0r.TrPvsr0rUdHello)objectxyr&r)r'r*__dict__)r+rUtt2rLs     r.test_newstyle_classz"XMLRPCTestCase.test_newstyle_classusV		
C"!)>?"QZZ(r0cV|jttjddzfy)Nrc)assertRaises
OverflowErrorr&r'r+s r.test_dump_big_longz!XMLRPCTestCase.test_dump_big_long~s-1b5(Cr0cT|jttjddify)Nrrrra	TypeErrorr&r'rcs r.test_dump_bad_dictz!XMLRPCTestCase.test_dump_bad_dicts)Y__|oFr0cgd}ddd|g}|j||jttj|fy)Nrfrg)appendrarir&r')r+lr\s   r.test_dump_recursive_seqz&XMLRPCTestCase.test_dump_recursive_seqs7
q1I	)Y__qd;r0cnddd}d|d}||d<|jttj|fy)Nr)12rg)3rJr\rhr+rJr\s   r.test_dump_recursive_dictz'XMLRPCTestCase.test_dump_recursive_dicts5NN#)Y__qd;r0cDtjdkDr/|jttj
t
dft	j
tjtjf|jttj
tjdzf|jttj
tjdz
fd}t	j}|jtj||jtj||jt|jtjdz||jt|jtjdz
|y)NircyNrTr=s r.dummy_writez5XMLRPCTestCase.test_dump_big_int.<locals>.dummy_writer0)sysmaxsizerarbr&r'intMAXINTMININT
Marshallerdump_intr+r|r?s   r.test_dump_big_intz XMLRPCTestCase.test_dump_big_ints#;; mY__"5zm
-	))9+;+;<=-$++A-/	1-$++A-/	1	
  "	

9##[1	

9##[1-#**1,k	;-#**1,k	;r0ctjtdftjttjttjftjttjdzttjdz
fd}tj
}|j
tj||j
tj||j
tjdz||j
tjdz
|y)Nrx*cyrzrTr{s r.r|z4XMLRPCTestCase.test_dump_double.<locals>.dummy_writer}r0)r&r'floatrrrdump_doublers   r.test_dump_doublezXMLRPCTestCase.test_dump_doublesw)*y//0y//02	3y//"45y//"457	8	
  "	

i&&4	

i&&4	

i&&+[9	

i&&+[9r0ctdgz}tdgzf}tj|d}|j|tj|dd|jttj|fy)NT)
allow_noner)r(r&r'r*r)rari)r+rHarg1strgs    r.test_dump_nonezXMLRPCTestCase.test_dump_nonesi t5#//$/215	7)Y__tg>r0cddi}tj|fd}d|z}|jtj|dd||j	dd}|jtj|dd|tj|fdd	}|jtj|dd||j	dd}|jtj|dd|d
}tj|fd|}|jtj|dd||jtj|d|y)
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_encodingsM "$x-@=D.q1!4e<{{=*=>.q1!4e<x-.24.q1!4e<{{=*=>.q1!4e<'
x-*46.q1!4e<.q1:>r0cbd}|j|tj|tttjfD]}||}tj
|f}tj|d\}}|\}|j|||jt|t|j|tj|d\}}|\}|j|||jt|tj|j|y)Nr
Tr2F)
r*r&Binarybytes	bytearrayr'r)r8r9r:)r+sampletype_rHr=r>r?newvalues        r.test_dump_byteszXMLRPCTestCase.test_dump_bytess$!1!1&!9:Iy'7'77	!E&ME)A!TBIFA KXXv.MM$x.%0a !UCIFA KXXv.MM$x.)*:*:;a 	!r0ctj}d}|j|tj|d}|j|tj|d}|j|tj|y)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_unsupportedsf!//
G-$?4	
-$?5	
-$?r0cd|z}tj|fi|\}}|\}|j|||jt	|t	||j|y)Nz1<params><param><value>%s</value></param></params>)r&r)r*r8r9r:)r+r=rHkwargsr,r>r?rs        r.check_loadszXMLRPCTestCase.check_loadss^BQFOOD3F3	5)

d8nd5k2!r0c|j}|dd|dd|dd|dd|dd|d	d|d
d|dd
|dtjd|ddd|dtjd|dt	jddddddd|dddg|ddddy)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!
'2
DFkl
%z2
&4
#Z0
,k:
$e,
556	8
5$	>
F  !45	7
FaRR8 $	&	 "#Q	)	"#+	-r0c|j}|dd|dd|dd|dd|dd|d	d
|dd|d
tjdy)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_typessr  
h
k4 
nc"
&
#Z0
="	$
'2
>oo56	8r0c`|j}d}tj|5d|dzz}|jt5|d|ddddd|jt5|d|ddddddddy#1swY=xYw#1swYxYw#1swYyxYw)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	=y1}%A"":.
/aS'.
/"":.
=QC}5t<
=		=	=
/
/
=
=		=	=s;B$BB$-B;B$B	B$B!	B$$B-ctjj}|j|j	dddgify)Nz
user@host.tldzhost.tld)
AuthorizationzBasic dXNlcg==)xmlrpcclient	Transportr*
get_host_info)r+transps  r.test_get_host_infoz!XMLRPCTestCase.test_get_host_info.sA((*--o>%?@"F	Gr0c	ddl}d}	tjj	djy#t$rd}Y<wxYw#t$r|j|dYyt$r|j|YywxYw)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~	G	%MM%%&>?LLN	G	#	PW&NO	%OOG$	%s&7-AAAB%BBctGddtjj}fd}tjjtj
df||j
jtj|}|j|j
|jdjj}tj|5}|j!|j#d|j!|j#ddddy#1swYyxYw)Nc eZdZdZdZdZdZy)@XMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandlerHTTP/1.1Fct|jjd}|jj	||j
rd|_ytjdd}|j}|jtjj|jdt||j!|j"j%|d|_d|_y)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)$??4E#??,""4??#5#56  !13x=A  "

  *#(-%r0cyrzrT)r+formatargss   r.log_messagezLXMLRPCTestCase.test_keepalive_disconnect.<locals>.RequestHandler.log_messageWsr0N)rQrRrSprotocol_versionrrrrTr0r.RequestHandlerrDs)G

.
r0rcjjtdjjyNr)socket
settimeoutrhandle_request)serversr.
run_serverz<XMLRPCTestCase.test_keepalive_disconnect.<locals>.run_server[s1MM$$U1X.!!#!!#r0r)targetz
http://{}:{}/rm)rrBaseHTTPRequestHandler
HTTPServerrHOST
addCleanupserver_close	threadingThreadstartjoinrserver_addressr&rr*method)r+rrthreadurlprs      @r.test_keepalive_disconnectz(XMLRPCTestCase.test_keepalive_disconnectCs	T[[??	.	$
''););Q(?P++,!!4$$o$$f&;&;<

"
"3
'	,1QXXZ+QXXZ+	,	,	,s
$AD..D7N)rQrRrSr/rArCrMr^rdrjrprvrrrrrrrrrrrrrrTr0r.r$r$0su,
D$&)DG<<;,: ??*!&@-68=G%%,r0r$cFeZdZGddeZdZdZdZdZdZ	dZ
y	)
SimpleXMLRPCDispatcherTestCaseceZdZdZy)*SimpleXMLRPCDispatcherTestCase.DispatchExczSRaised inside the dispatched functions when checking for
        chained exceptionsN)rQrRrS__doc__rTr0r.DispatchExcrls	r0rcd}fd}tjj}|j|j	j
5}|j
d|dddjjj|fj|jjj|jjy#1swY{xYw)z$Calls explicitly registered functionrfc&j|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_funcps

	+]]99;
$$_5


t//
0	@G  !2J?	@**//*?'++556'++778		@	@sC  C)cd}Gdd}tjj}|j||j	|j
5}|j
d|ddd|jjj|f|j|jj|j|jjy#1swY{xYw)z3Calls a registered instance attribute as a functionrfceZdZdZy)OSimpleXMLRPCDispatcherTestCase.test_call_instance_func.<locals>.DispatchedClassc,tj|rzrr)r+r
s  r.rz_SimpleXMLRPCDispatcherTestCase.test_call_instance_func.<locals>.DispatchedClass.dispatched_funcs4@@HHr0N)rQrRrSrrTr0r.DispatchedClassrs
Ir0rrN
rrrregister_instancerarrr*rrr:rr)r+rrrrs     r.test_call_instance_funcz6SimpleXMLRPCDispatcherTestCase.test_call_instance_funcs

	I	I]]99;
$$_%67


t//
0	@G  !2J?	@**//*?'++556'++778		@	@sC))C2cd}d}Gdd}tjj}|j||j	|j
5}|j
||ddd|jjj||f|j|jj|j|jjy#1swY|xYw)z4Calls the registered instance's `_dispatch` functionrrfceZdZdZy)LSimpleXMLRPCDispatcherTestCase.test_call_dispatch_func.<locals>.TestInstancec.tj||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;
$$\^4


t//
0	9G  Z8	9**//*j1IJ'++556'++778		9	9sC,,C5ctjj}|jdd|j	t
d5|j
dddddy#1swYyxYw)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$9

#
#Ix
8	7  :6	7	7	7sA$$A-ctjj}|jt	|jtd5|jdddddy#1swYyxYw)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;
$$VX.

#
#Ix
8	7  :6	7	7	7sA**A3ctjj}|jtd5|jdddddy#1swYyxYw)z2Calls a function that the dispatcher cannot locaterr)N)rrrr+r,rr-s  r.test_cannot_locate_funcz6SimpleXMLRPCDispatcherTestCase.test_cannot_locate_funcsK]]99;


#
#Ix
8	7  :6	7	7	7sAAN)rQrRrSr,rrrr%r.r0r2rTr0r.rrks,i9$9&9*777r0rceZdZdZy)HelperTestCasec|jtjdd|jtjdd|jtjddy)Nza&bza&amp;bza<bza&lt;bza>bza&gt;b)r*r&escapercs r.test_escapezHelperTestCase.test_escapesS))%0)<))%0(;))%0(;r0N)rQrRrSr7rTr0r.r4r4s<r0r4ceZdZdZdZdZy)
FaultTestCasectjdd}|jt|d|jt|t	|y)Nr
Test Faultz<Fault 42: 'Test Fault'>)r&Faultr*reprrI)r+fs  r.	test_reprzFaultTestCase.test_reprs?OOB-a"<=a#a&)r0ctjdd}tj|f}tj|\\}}|j	|ddd|j	|dtj
j|}|j
tjtj|y)Nrr;)	faultCodefaultString)r&r<r'r)r*rra)r+r>r=newfr?s     r.test_dump_faultzFaultTestCase.test_dump_faultsOOB-OOQD!__Q'
RMND!  "((+)//9??A>r0c|jttjjt
d|j
tjj	t
dyN__addtitle)raAttributeErrorrrresolve_dotted_attributerIrrcs r.test_dotted_attributez#FaultTestCase.test_dotted_attributesC	
. --@@#w	P

>>sGLMr0N)rQrRrSr?rDrKrTr0r.r9r9s*
?Nr0r9c<eZdZdZdZdZdZdZdZdZ	dZ
y	)
DateTimeTestCasecBtjd5}tjgd}||_tj
}t
j}|jt|tjd|dddy#1swYyxYw)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
ZZ(
)	J^**35K*5N'(I""$ASV!]]+<iH
J
	J	J	JsA6BBc	d}tj|}|jt|t	j
dt	j|yNgl]ޮArT)r&r7r*rIrVrZrYrus   r.	test_timezDateTimeTestCase.test_timesDq!Q'8$..:KL	Nr0chd}tj|}|jt|dy)N)		r&2rmrz20070609T10:38:50)r&r7r*rIrus   r.test_time_tuplez DateTimeTestCase.test_time_tuples,'q!Q!45r0ctjd}tj|}|j	t|tjd|yr_)rVrYr&r7r*rIrZrus   r.test_time_structz!DateTimeTestCase.test_time_structsANN,-q!Q/@!!DEr0ctjdddddd}tj|}|jt	|dy)Nrbrrrgrlrmz20070102T03:04:05)r6r&r7r*rIrus   r.test_datetime_datetimez'DateTimeTestCase.test_datetime_datetimesAd1Qq1-q!Q!45r0ctjdddddd}tj|}dt|z}|j	t||y)Nrbrrrgrlrmz%<DateTime '20070102T03:04:05' at %#x>)r6r&r7idr*r=)r+rJr\vals    r.r?zDateTimeTestCase.test_reprsNd1Qq1-q!
4r!u
<a#&r0c
d}tj}|j|tjtjdddddd}|j	||tj
|}|j	||y)Nz 20070908T07:11:13  rbrdrOr
)r&r7decoder6r*	_datetime)r+rJt1trefr]s     r.test_decodezDateTimeTestCase.test_decodesu"



!
		!!!("3"3D1Qr""EFT"

 
 
#T"r0ctjj}tj|j	}|j||k(|j||k(|tjdz}|j||k\|j||k|jd}|j||k(|j||k(tj|j	}|j||k\|j||k|jd}|j	}|j|dk(|j||k7|j|t|k(|j||k7|jt5|tdkddd|jt5||kDddd|jt5|t|kddd|jt5||k\ddd|j|tk(|j|tk7|j|tk|j|tkD|j|tk|j|tk\|j|t k|j|t kD|j|t k|j|t k\y#1swYmxYw#1swYWxYw#1swY8xYw#1swY"xYw)Nrl)secondsrTasciii)r6nowr&r7	timetupler	timedeltarZrrrrarirrr	r
)r+r{dtimethendstr
dtime_thendbytesdtuples        r.test_comparisonz DateTimeTestCase.test_comparisons##%""3==?3	
%u%X''22
&%||-.
&
&''(89

d*+z)*W%$'()F"334(


y
)	 E$K	 


y
)	FN	


y
)	'Yv&&	'


y
)	VO		
*+)+,()()')*)*()(*+)*%	 	 			'	'		s0>L8*M
M9M8MMMM)N)rQrRrSr]r`rhrjrlr?rwrrTr0r.rMrMs-JN6
F
6
'#,+r0rMceZdZdZdZdZy)BinaryTestCasecbtj}|jt|dy)Nr&rr*rI)r+r\s  r.r]zBinaryTestCase.test_defaultEs$Q$r0c|d}tj|}|jt|t|dyNsabc123zlatin-1rrus   r.test_stringzBinaryTestCase.test_stringIs2)QQQ	!23r0c:d}tj|}tj}|j	||jt
|t
|dtj|}|jt
|t
|dyr)base64encodebytesr&rrsr*rI_binary)r+rJderur]s     r.rwzBinaryTestCase.test_decodeNsv)



"




		"
R#a"34


r
"R#a"34r0N)rQrRrSr]rrwrTr0r.rr>s%4
5r0rcGdd}Gddtjj}|stjj}|d||dd}	|j	|j
j
\aadttfza	|j|j|j|jt|jd	d
|jd}|jd
d}|}	|j|	d|j!|dkDr|j#|dz}|dkDr|j
j'da|j!y#t$$rY8wxYw#|j
j'da|j!wxYw)Nc,eZdZdZdZGddZy)&http_server.<locals>.TestInstanceClassc||zSrzrTr+rYrZs   r.divz*http_server.<locals>.TestInstanceClass.div`6Mr0c|dk(ryyNrThis is the div functionrTr+r(s  r._methodHelpz2http_server.<locals>.TestInstanceClass._methodHelpcu}1r0ceZdZedZy).http_server.<locals>.TestInstanceClass.Fixturecy)N42rTrTr0r.getDataz6http_server.<locals>.TestInstanceClass.Fixture.getDatahsr0N)rQrRrSstaticmethodrrTr0r.Fixturergs


r0rN)rQrRrSrrrrTr0r.TestInstanceClassr_s		2		r0rceZdZdZy)#http_server.<locals>.MyXMLRPCServercf|jj\}}|jd||fSNTracceptsetblockingr+r=ports   r.get_requestz/http_server.<locals>.MyXMLRPCServer.get_requestm/kk((*GAt
MM$d7Nr0NrQrRrSrrTr0r.MyXMLRPCServerrl	r0r	localhostrF)rlogRequestsbind_and_activatehttp://%s:%dc|SrzrT)rYs r.<lambda>zhttp_server.<locals>.<lambda>sr0têštcyThis is my functionTrTrTr0r.my_functionz http_server.<locals>.my_functionsr0addr'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^s99AA*N#+&+uFD#[[,,.
d
dD\)--/))+s#{H5	
			
 	
		U		+	
,	(*|E	Ao!1KAo	
	

	
	s%DF

	FFFF.G
cGdd}d}Gddtjj}|stjj}Gdd|}Gdd	}|d
|dd}|jjd
|j
	|jj\aa	dttfza
|jgd}	|	D]e}
|j|
tjj}|j|j|j!|
fddg|j#|	dj!t$|j#|	dj!dd|jd||j'|dkDr|j)|dz}|dkDr|jj-da	|j'y#t*$rY8wxYw#|jj-da	|j'wxYw)NceZdZdZdZy),http_multi_server.<locals>.TestInstanceClassc||zSrzrTrs   r.rz0http_multi_server.<locals>.TestInstanceClass.divrr0c|dk(ryyrrTrs  r.rz8http_multi_server.<locals>.TestInstanceClass._methodHelprr0N)rQrRrSrrrTr0r.rrs		2r0rcyrrTrTr0r.rz&http_multi_server.<locals>.my_functionsr0ceZdZdZy))http_multi_server.<locals>.MyXMLRPCServercf|jj\}}|jd||fSrrrs   r.rz5http_multi_server.<locals>.MyXMLRPCServer.get_requestrr0NrrTr0r.rrrr0rceZdZgZy)+http_multi_server.<locals>.MyRequestHandlerN)rQrRrS	rpc_pathsrTr0r.MyRequestHandlerrs	r0rceZdZddZy)+http_multi_server.<locals>.BrokenDispatcherNctd)Nzbroken dispatcher)RuntimeError)r+rdispatch_methodpaths    r._marshaled_dispatchz?http_multi_server.<locals>.BrokenDispatcher._marshaled_dispatchs233r0NN)rQrRrSrrTr0r.BrokenDispatcherrs	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_serverrs22<<AA>44*,<&+uFDKK1"[[,,.
d
dD\)

	:D##D&--*N*N*PQA
..0
**,
 0&9		:
	
E!H%77<E!H%77OL*:*<=	Ao!1KAo	
	

	
	s%D<H	H
HHH.Ic	|jdk(s|jy|jjd}|rd|jvryyy#t$rt	|}Y-wxYw)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_exceptionrsi99?aii/99==/
-1AABx	q6sAAA'&A'c|sdSfd}|S)Nc|SrzrT)funcs r.rz)make_request_and_skipIf.<locals>.<lambda>sDr0cfd}|S)Nc	tjtjtj#tjt
f$r}t
|sYd}~?d}~wwxYwrz)	r&rrr
ProtocolErrorrrunittestSkipTest)r+rreasons  r.make_request_and_skipzImake_request_and_skipIf.<locals>.decorator.<locals>.make_request_and_skips_
%%c*668##F++++W5
/23
s'?A.A))A.rT)rrrs  r.	decoratorz*make_request_and_skipIf.<locals>.decorators	,%$r0rT)	conditionrrs ` r.make_request_and_skipIfrs  %r0c0eZdZdZdZeeZdZdZ	y)BaseServerTestCaseNrcdtjj_t	j
|_|j|j|jf}t	j|j|}|j|j|j|jj|jjy)NTrr)rrr_send_traceback_headerrEventr
request_countrr
threadFuncrrrwaitclearr+	serv_argsrs   r.setUpzBaseServerTestCase.setUpsBF

((???$XXt1143F3FG	!!yI$	


r0cv|jjdtjj_yNF)rrrrrrrcs r.tearDownzBaseServerTestCase.tearDowns%

CH

((?r0)
rQrRrSrrrrrr"r%rTr0r.rrs!NMk*J
Hr0rceZdZdZdZdZdZdZdZdZ	e
ejjdk\d	d
ZdZdZd
ZdZdZdZdZdZdZy)SimpleServerTestCasec
*	tjt}|j|j	dddy#tj
tf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)Nrcrq
rr)
r&rrr*rrrrfailgetattrr+rrs   r.test_simple1z!SimpleServerTestCase.test_simple1#sy	E%%c*AQUU1QZ.''1	E+A.		aIr)BCDD/	Es;>B,B

Bc
8d}d}	tjt}|j|j	||||zy#tj
tf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~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''1	E+A.		aIr)BCDD/	Es>AB,BBc
Pd}d}	tjtd}|j|j	||||zy#tj
tjf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)N€¤rrr*rrr&rrr*rrrerrorrr+r,r0s     r.test_client_encodingz)SimpleServerTestCase.test_client_encoding:s
	E%%cMBAQUU<<)J6
8''6	E+A.		aIr)BCDD/	EsAA#B%*,B  B%c
@	tjtd}|j|j	ddy#tj
tjf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~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+A.		aIr)BCDD/	Es<?#B",BBcXtjtjj	t
t5}|jdd|j}ddd|jjd|j|jdy#1swYBxYw)NPOSTz/this-is-not-validiz	Not Found)
contextlibclosingrrHTTPConnectionrrrequestgetresponser*statusr)r+connrs   r.test_404zSimpleServerTestCase.test_404Rs

 : :4 F
G	*4LL!56'')H	*	
#.+6	*	*s#B  B)c
jtgd}	tjt}|jj}|j
t||y#tjtf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)N)
rrrrrzsystem.listMethodszsystem.methodHelpzsystem.methodSignaturezsystem.multicallrr*rr)rr&rrsystemlistMethodsr*rrrr+r,)r+expected_methodsrmethrs     r.test_introspection1z(SimpleServerTestCase.test_introspection1\s +,	E%%c*A88'')DSY(89''1	E+A.		aIr)BCDD/	EsAAB27,B--B2c
@	tjt}|jj	d}|j|dy#tjtf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)Nrrr*rrr&rrrH
methodHelpr*rrrr+r,)r+rdivhelprs    r.test_introspection2z(SimpleServerTestCase.test_introspection2ls		E%%c*Ahh))%0GW&@A''1	E+A.		aIr)BCDD/	EAA		B",BBrz)Docstrings are omitted with -O2 and abovec
@	tjt}|jj	d}|j|dy#tjtf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)Nrrr*rrrN)r+r
myfunctionrs    r.test_introspection3z(SimpleServerTestCase.test_introspection3xs		E%%c*A,,];JZ)>?''1	E+A.		aIr)BCDD/	ErRc
@	tjt}|jj	d}|j|dy#tjtf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)Nrzsignatures not supportedr*rr)r&rrrHmethodSignaturer*rrrr+r,)r+rdivsigrs    r.test_introspection4z(SimpleServerTestCase.test_introspection4s	E%%c*AXX--e4FV%?@''1	E+A.		aIr)BCDD/	ErRc
	tjt}tj|}|j	dd|jdd|j
dd|\}}}|j|d|j|d|j|dy#tjtf$r;}t|s&|j|d	t|d
dYd}~yYd}~yd}~wwxYw)Nrrgrcrqrrmr)r*rr)
r&rr	MultiCallrrrr*rrrr+r,)r+r	multicall
add_result
pow_result
div_resultrs       r.test_multicallz#SimpleServerTestCase.test_multicalls	E%%c*A!++A.IMM!AMM!AMM#b!1:.J
JZ-Z.Z1''1	E+A.		aIr)BCDD/	EsB%B((C<,C77C<c
	tjt}tj|}|j	|}|j|jddd|j|jdddy#tjtf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~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((*[F
V^^A.{;Q?V^^A.}=#
$''1	E+A.		aIr)BCDD/	EsB	BC %,CC c|jttjjt
d|j
tjj	t
d|jyrF)rarIrrrJrIrr.rcs r.rKz*SimpleServerTestCase.test_dotted_attributesQ. --@@#w	P	


>>sGLM	
r0ctjdttfz}|jj}|j
|dy)Nhttp://%s:%d/RPC2r)r&rrrrrr*)r+rrs   r.test_allow_dotted_names_truez1SimpleServerTestCase.test_allow_dotted_names_trues>&&':dD\'IJ~~%%'t$r0ctjdttfz}|j	|jdddy)Nrhréuaé)r&rrrr*rr+rs  r.test_unicode_hostz&SimpleServerTestCase.test_unicode_hosts7&&':dD\'IJC0':r0ctjtjtt
f5}|j
dtdt
djddddy#1swYyxYw)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_postsn


 8 8$ F
G	C4II $fAdV,22
39&/
C	C	C	Cs0A,,A5ctjt5}|jdd|j	|dj
dddd|j
dj
dy#1swY,xYw)Nrrg	transportr)r&rrrassertNotEqual_connectionr*rls  r.test_context_managerz)SimpleServerTestCase.test_context_managerss

"
"3
'	.6JJq!{ 3 ? ? ,
.	.	
,88%	'		.	.s5A::Bc	tjt5}|jddddd|jdjdy#1swY,xYw#tj$rYDwxYw)Nrrrtr)r&rrrr<r*rvrls  r.!test_context_manager_method_errorz6SimpleServerTestCase.test_context_manager_method_errorso	&&s+
#v

1c"
#	
,88%	'	
#
#		s'A%AA%A"A%%A;:A;N)rQrRrSr.r3r9r<rFrLrQrr~flagsoptimizerUrYrarerKrirmrrrwryrTr0r.r'r'"sEEEE7
E 
ESYY//14@B
EB
EEE"E*%;C''r0r'c$eZdZeddZdZy)SimpleServerEncodingTestCaseNc t|||dy)Nr)r)rrrrs    r.rz'SimpleServerEncodingTestCase.threadFuncsCnmDr0c
Ld}d}	tjt}|j|j	||||zy#tj
tjf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)Nr5r6r*rrr7r0s     r.test_server_encodingz1SimpleServerEncodingTestCase.test_server_encodings
	E%%c*AQUU<<)J6
8''6	E+A.		aIr)BCDD/	Es>A#B#(,BB#r)rQrRrSrrrrTr0r.r}r}sEEEr0r}ceZdZeeZdZdZdZe	jddZe	jddZe	jddZ
e	jddZe	jdd	Ze	jdd
Ze	jddZe	jddZe	jdd
Zy)MultiPathServerTestCaserctjtdz}|j|j	ddd|jtj|jddy)Nrrcrqr))r&rrr*rrar<rr+rs  r.
test_path1z"MultiPathServerTestCase.test_path1sL!!#f*-qT*)//155!Q7r0ctjtdz}|j|j	ddd|jtj|jddy)Nrrcrq)r&rrr*rrar<rrs  r.
test_path2z"MultiPathServerTestCase.test_path2sL!!#j.1qS))//155!Q7r0walltimectjtdz}|jtj|j
ddy)Nrrcrqr&rrrar<rrs  r.
test_path3z"MultiPathServerTestCase.test_path3
s3!!#l"23)//155!Q7r0ctjtdz}|jtj|j
ddy)Nz/invalidrcrqrrs  r.test_invalid_pathz)MultiPathServerTestCase.test_invalid_paths2!!#j.1)//155!Q7r0c|tjtdz}|j|j	dy)Nrr&rrr*rrs  r.test_path_query_fragmentz0MultiPathServerTestCase.test_path_query_fragments-!!#o"56?3r0c|tjtdz}|j|j	dy)Nrrrs  r.test_path_fragmentz*MultiPathServerTestCase.test_path_fragments,!!#k/2;/r0c|tjtdz}|j|j	dy)Nrrrs  r.test_path_queryz'MultiPathServerTestCase.test_path_querys,!!#j.1:.r0cvtjt}|j|j	dy)Nrrrs  r.test_empty_pathz'MultiPathServerTestCase.test_empty_path#s(!!#&7+r0c|tjtdz}|j|j	dy)Nrrrs  r.test_root_pathz&MultiPathServerTestCase.test_root_path(s,!!#),3'r0c|tjtdz}|j|j	dy)Nrrrs  r.test_empty_path_queryz-MultiPathServerTestCase.test_empty_path_query-s,!!#,/6*r0c|tjtdz}|j|j	dy)Nrrrs  r.test_empty_path_fragmentz0MultiPathServerTestCase.test_empty_path_fragment2s,!!#-07+r0N)rQrRrSrrrrrrrrequires_resourcerrrrrrrrrrTr0r.rrsE/0JM8
8
Wz*8+8Wz*8+8Wz*4+4Wz*0+0Wz*/+/Wz*,+,Wz*(+(Wz*+++Wz*,+,r0rcTeZdZGddejj
ZeZdZy)BaseKeepaliveServerTestCasecLeZdZejj
ZdZgZdZ	dZ
y)*BaseKeepaliveServerTestCase.RequestHandlerrc|jjgt|jdz
|_|jj|Sr)
myRequestsrnrreqidxparentClasshandlercs r.rz1BaseKeepaliveServerTestCase.RequestHandler.handleAs@OO""2&doo.q0DK##**400r0c|jj|}|j|jj	|j
|Srz)rhandle_one_requestrrrnraw_requestline)r+r>s  r.rz=BaseKeepaliveServerTestCase.RequestHandler.handle_one_requestEs>%%88>FOODKK(//0D0DEMr0N)rQrRrSrrrrrrrrrTr0r.rr=s&mm>>%
	1	r0rcNg|j_tj|Srz)rrrr"rcs r.r"z!BaseKeepaliveServerTestCase.setUpKs!)+&!''--r0N)	rQrRrSrrrrrr"rTr0r.rr:s$AA$N.r0rceZdZdZy)KeepaliveServerTestCase1ctjt}|j|j	ddd|j|j	ddd|j|j	ddd|d|jt|jjd|jt|jjddy)Nrcrqr)rrrr	r&rrr*rrrrassertGreaterEqualrs  r.test_twoz!KeepaliveServerTestCase1.test_twoSs!!#&qT*qT*qT*'
	
T00;;<a@	
D$7$7$B$B2$F GKr0N)rQrRrSrrTr0r.rrRs
Lr0rceZdZdZdZdZy)KeepaliveServerTestCase2rc(tjt}|j|j	ddd|j|j	ddd|j|j	ddd|d|j|j	ddd|j|j	ddd|j|j	ddd|d|jt|jjd|jt|jjdd|jt|jjddy)Nrcrqr)rrrrrs  r.
test_closez#KeepaliveServerTestCase2.test_closeis3!!#&qT*qT*qT*'
qT*qT*qT*'
	
T00;;<a@D$7$7$B$B2$F GKD$7$7$B$B2$F GKr0cbtjt}|j|j	ddd|dj|j|j	ddd|d|jt
|jjdy)Nrcrqr)rtrr)	r&rrr*rrrrrrs  r.test_transportz'KeepaliveServerTestCase2.test_transport|s!!#&qT*	+qT*'
T00;;<a@r0N)rQrRrSrrrrTr0r.rresML&Ar0rz
requires gzipceZdZGddejj
ZeZGddejZ	dZ
dZdZdZ
y	)
GzipServerTestCasecBeZdZejj
ZdZdZy)!GzipServerTestCase.RequestHandlerrct|jd|j_|jj|S)Ncontent-length)rr	__class__content_lengthrrrcs r.rz)GzipServerTestCase.RequestHandler.do_POSTs4,/=M0N,ODNN)##++D11r0N)	rQrRrSrrrrrrrTr0r.rrsmm>>%	2r0rceZdZdZdZdZy)GzipServerTestCase.TransportFct|jdd|_tjj||S)Nrr)r	getheaderresponse_lengthr&rparse_response)r+rs  r.rz+GzipServerTestCase.Transport.parse_responses6!$X%7%78H!%L!MD &&55dHEEr0c|jr|jddtjj	|||S)NzContent-Encodinggzip)	fake_gzip	putheaderr&rsend_content)r+
connectionbodys   r.rz)GzipServerTestCase.Transport.send_contents5~~$$%7@&&33D*dKKr0N)rQrRrSrrrrTr0r.rrs		F	Lr0rc.tj|yrz)rr"rcs r.r"zGzipServerTestCase.setUps  &r0c|j}d|_tjt|}|j|j
ddd|jj}d|_|j|j
ddd|jj}|j||kD|dyNrtrcrqr)rr)
rencode_thresholdr&rrr*rrrr)r+r\rrrs     r.test_gzip_requestz$GzipServerTestCase.test_gzip_requestsNN!!!#3qT*..qT*..!'
r0cH|j}d|_d|_tjt
|}|j
tjtjd}|5|jddddd|dy#1swYxYw)NTrz\b400\brcrqr)rrrr&rrr+rrecompiler)r+r\rcms    r.test_bad_gzip_requestz(GzipServerTestCase.test_bad_gzip_requestsNN!!!#3

#
#I$;$;$&JJz$:<
	
EE!QK	'
		s/BB!c|j}tjt|}|jj
}d|j_|j
|jddd|j}d|j_|j
|jddd|d|j}||j_|j||kDyr)
rr&rrrrr*rrr)r+r\roldrrs      r.test_gzip_responsez%GzipServerTestCase.test_gzip_responsesNN!!#3!!22/3,qT*
/0,qT*'

/2,!r0N)rQrRrSrrrrrr&rr"rrrrTr0r.rrsG2AA2$NLI''L'
	r0rceZdZdZy)GzipUtilTestCasecd}d|z}tj|}tj|}|jt	||d|dzz}tj|}|jtd5tj|dddtj|dy#1swY!xYw)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*&''-''0W7!+,''-

#
#J$IK	+!!'*	+	g"5		+	+sB66B?N)rQrRrSrrTr0r.rrs6r0rceZdZGddejj
ZeZgdZfdZ	dZ
dZdZdZ
d	Zd
ZxZS)HeadersServerTestCasec"eZdZdZfdZxZS)$HeadersServerTestCase.RequestHandlerNcV|j|j_t|Srz)rrtest_headerssuperrr+rs r.rz,HeadersServerTestCase.RequestHandler.do_POSTs *.,,DNN'7?$$r0)rQrRrSrr
__classcell__rs@r.rrs	%	%r0r)HostzAccept-EncodingzContent-Typez
User-AgentrcBd|j_t|
Srz)rrrr"rs r.r"zHeadersServerTestCase.setUps+/(w}r0c&t|jt|jz}|j	t|j||jD]&\}}|j
|j||(yrz)sortedstandard_headerslistkeysassertListEqualitemsr*r)r+r
additional
expected_keyskeyrHs      r.assertContainsAdditionalHeadersz5HeadersServerTestCase.assertContainsAdditionalHeaderssst44tJOO<M7NNO
VGLLN3]C$**,	6JCW[[-u5	6r0ctjtdg}|j|j	ddd|j
j}|j|ddiy)NX-Testfoorrcrqr)rrr&rrr*rrrrr+rrs   r.test_headerz!HeadersServerTestCase.test_headersX!!#0A/BCq!d+%%22,,Wx6GHr0ctjtddg}|j|j	ddd|j
j}|j|ddd	y)
Nr)
X-Test-Secondbarrrcrqr)rr)rrrrs   r.test_header_manyz&HeadersServerTestCase.test_header_manysc!!+-EF
Hq!d+%%22,,>	@r0ctjtg}|j|j	ddd|j
j}|j|iy)Nrrcrqr)rrs   r.test_header_emptyz'HeadersServerTestCase.test_header_emptysO!!#r2q!d+%%22,,Wb9r0ctjtd}|j|j	ddd|j
j}|j|ddiy)N)rrrcrqr)rrrrs   r.test_header_tuplez'HeadersServerTestCase.test_header_tuple
sU!!#/CDq!d+%%22,,Wx6GHr0ctjtddij}|j	|jddd|jj}|j|ddiy)Nrrrrcrqr))	r&rrrr*rrrrrs   r.test_header_itemsz'HeadersServerTestCase.test_header_itemssb!!#%/@/F/F/HIq!d+%%22,,Wx6GHr0)rQrRrSrrrrrrr"rrr	rr
rrrs@r.rrsO%AA%$N6I@:IIr0rceZdZdZdZdZy)ServerProxyTestCasecPtjj|d|_y)Nzhttp://fake.localhost)rTestCaser"rrcs r.r"zServerProxyTestCase.setUps%+r0c|tj|j}|j|ddy)Nr)r&rrr*rs  r.rzServerProxyTestCase.test_close$s.!!$((+7t,r0ctj}tj|j|}|j	|d|y)Nrrt)r&rrrr*)r+r\rs   r.rz"ServerProxyTestCase.test_transport(s:!!!$((a8;+r0N)rQrRrSr"rrrTr0r.rrs+-,r0rc eZdZdfd	ZxZS)FailingMessageClasscP|j}|dk(ryt|	||S)NrzI am broken)rrr)r+rfailobjrs   r.rzFailingMessageClass.get1s+iik"" w{3((r0rz)rQrRrSrrrs@r.rr0s
))r0rc*eZdZdZdZdZdZdZy)FailingServerTestCasecFtj|_|jdf}tjt|}|j|j
|j|jj|jjy)Nrr)
rrrrrrrrrrr s   r.r"zFailingServerTestCase.setUp9se??$XXqM	!!9E$	


r0c|jjdtjj_tjj}|tjj_
yr$)rrrrrrrrHTTPMessagerMessageClass)r+
default_classs  r.r%zFailingServerTestCase.tearDownEsB

BG

((?//
@M

00=r0c
tjjj}|j	|ddtjj_	tjt}|j	|jdddy#t
jtf$r;}t|s&|j|dt|ddYd}~yYd}~yd}~wwxYw)	NFTrcrqr)r*rr)rrrrr*r&rrrrrrr+r,)r+flagvalrrs    r.
test_basicz FailingServerTestCase.test_basicNs--22II%(CG

((?	E%%c*AQUU1QZ.''1	E+A.		aIr)BCDD/	Es;BC',,C""C'cttjj_	tjt}|jdd|jdy#t
jtf$r}t|snt|dr]|j|jj!ddu|j|jj!dduYd}~yYd}~yYd}~yd}~wwxYw)NrcrqProtocolError not raisedrrX-traceback)rrrrrr&rrrr+rrrhasattrrrrr-s   r.test_fail_no_infoz'FailingServerTestCase.test_fail_no_info`s@S

00=
	2%%c*A
EE!AJ
II01''1	F+A.71i3H		

m < DE		

m < DEE4I.	Fs+A""C>;A/C99C>cBttjj_dtjj
_	tjt}|jdd|jdy#tjtf$r}t|sot|dr^d}|j!|j"j%d||j'|j"j%dduYd}~yYd}~yYd}~yd}~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_infops@S

00=CG

((?	2%%c*A
EE!AJ
II01''1	J+A.71i3HV  }!=|L		

m <D HII	4I.	Js+BDA0DDN)rQrRrSr"r%r#r(r+rTr0r.rr8s
NE$2 2r0rc#Ktj}tjtj|t_	tj|t_y#|t_wxYww)zhA variation on support.captured_stdout() which gives a text stream
    having a `buffer` attribute.
    rN)r~stdoutio
TextIOWrapperBytesIO)rorig_stdouts  r.captured_stdoutr2sH
**K!!"**,BCJ!jj 
[
sAA4A$A4$
A11A4c$eZdZdZdZdZdZy)CGIHandlerTestCasecJtjj|_yrz)rrCGIXMLRPCRequestHandlercgircs r.r"zCGIHandlerTestCase.setUps==88:r0cd|_yrz)r7rcs r.r%zCGIHandlerTestCase.tearDowns	r0ctj5}d|d<t|jj5}|jjdddj
d|j}|jd}dj|jdd}|j|d	|j|d
dddy#1swYxYw#1swYyxYw)NGETREQUEST_METHODrrr rrl400zBad Request)rEnvironmentVarGuardr2r7rrseekrsplitrr*)r+envdata_outrrDmessages      r.test_cgi_getzCGIHandlerTestCase.test_cgi_gets

*
*
,	5$)C !!$((*;*;<
*'')
*
MM!]]_F\\^A&Fhhv||~a23GVU+Wm4	5	5
*
*		5	5s#&C-C!BC-!C*	&C--C6cd}tj5}t|jj5}tj5}|j||jdtt||d<|jjdddddddddjd|j}|jtjtj |dd||j#dd}|j%t't)j*d|j-dt|y#1swYxYw#1swYxYw#1swYxYw)	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>r2r7rrcaptured_stdinrr?rIrrrrar&r<r)findr*rrsearchgroup)r+rrArBdata_inrcontents       r.test_cgi_xmlrpc_responsez+CGIHandlerTestCase.test_cgi_xmlrpc_responses?
*
*
,	&
dhh&7&7
8	&<D

#
#
%	&)0MM$LLO$'D	NC !HH##%
	&	&	&	

a	
)//9??F23KHW-./		2F;AA!DEL	/	&	&	&	&	&	&s;!FE4
AE(!E4)F(E1-E44E=	9FF	N)rQrRrSr"r%rDrNrTr0r.r4r4s;5$(r0r4ceZdZdZdZdZy)UseBuiltinTypesTestCasecBg_d}tjdddddd}tj||fd}fd	}tj
j
d
dd
}|j||j|jtjdj\}}jj||gjt|tjjt|ty)
Nr
irmfoobarc<jj|yrz)logextend)rr+s r.rVz>UseBuiltinTypesTestCase.test_use_builtin_types.<locals>.foobarsHHOOD!r0T)rrr3r)rXr6r&r'rrrr
rr*rr8r9r)r+expected_bytes
expected_date	marshaledrVhandlermybytesmydates`       r.test_use_builtin_typesz.UseBuiltinTypesTestCase.test_use_builtin_typess, ))$2r2rB
OO^]$CXN		"--66dd7D!!&)##I.TXX*((NM#BC

d6lH$5$56

d7mU+r0cztjjd}|j|jy)NTr2)rrr6rr3)r+r]s  r.*test_cgihandler_has_use_builtin_types_flagzBUseBuiltinTypesTestCase.test_cgihandler_has_use_builtin_types_flags+--77$7O112r0ctjjdd}|j|j	|j
y)NrTr2)rrrrrr3rls  r.,test_xmlrpcserver_has_use_builtin_types_flagzDUseBuiltinTypesTestCase.test_xmlrpcserver_has_use_builtin_types_flags?112B"2$001r0N)rQrRrSr`rbrdrTr0r.rPrPs,(32r0rPcttj}tjtjg|yrz)rthreading_setupraddModuleCleanupthreading_cleanup)thread_infos r.setUpModulerjs*"224K.@@O;Or0__main__rrz)zutf-8)Hrr6rr~rVrr
xmlrpc.clientrr&
xmlrpc.serverrhttp.clientrhttp.serverrrrr.r?rrtest.supportrrrrr	r
rrrequires_working_socketrrr7r(rr$rr4r9rMrrrrrrrrrr'r}rrrrskipIfrrrrrrrcontextmanagerr2r4rPrjrQmainrTr0r.<module>rus(

!
		"&)55 t,'#%Y%%&9:)#$78)')y))*=>)y));=)y)))))$2r2rBD
	
$x,X&&x,v	T7X%6%6T7n<X&&<NH%%N.\+x((\+~5X&&56tc
>@DP" H**H6D'-D'NE#5E(8,08,z."4.0L:L&A:AD/@+@0@F/6x((606&:I.:I|,(++,&)$++11)K2H--K2\	!	!A**AH2h//2BP
zHMMOI/Ds,KK! K!