4747
4848class XMLRPCTestCase (unittest .TestCase ):
4949
50- @unittest .expectedFailure # TODO: RUSTPYTHON
5150 def test_dump_load (self ):
5251 dump = xmlrpclib .dumps ((alist ,))
5352 load = xmlrpclib .loads (dump )
5453 self .assertEqual (alist , load [0 ][0 ])
5554
56- @unittest .expectedFailure # TODO: RUSTPYTHON
5755 def test_dump_bare_datetime (self ):
5856 # This checks that an unwrapped datetime.date object can be handled
5957 # by the marshalling code. This can't be done via test_dump_load()
@@ -88,7 +86,6 @@ def test_dump_bare_datetime(self):
8886 self .assertIsNone (m )
8987
9088
91- @unittest .expectedFailure # TODO: RUSTPYTHON
9289 def test_datetime_before_1900 (self ):
9390 # same as before but with a date before 1900
9491 dt = datetime .datetime (1 , 2 , 10 , 11 , 41 , 23 )
@@ -107,7 +104,6 @@ def test_datetime_before_1900(self):
107104 self .assertIs (type (newdt ), xmlrpclib .DateTime )
108105 self .assertIsNone (m )
109106
110- @unittest .expectedFailure # TODO: RUSTPYTHON
111107 def test_bug_1164912 (self ):
112108 d = xmlrpclib .DateTime ()
113109 ((new_d ,), dummy ) = xmlrpclib .loads (xmlrpclib .dumps ((d ,),
@@ -118,7 +114,6 @@ def test_bug_1164912 (self):
118114 s = xmlrpclib .dumps ((new_d ,), methodresponse = True )
119115 self .assertIsInstance (s , str )
120116
121- @unittest .expectedFailure # TODO: RUSTPYTHON
122117 def test_newstyle_class (self ):
123118 class T (object ):
124119 pass
@@ -184,7 +179,6 @@ def dummy_write(s):
184179 m .dump_double (xmlrpclib .MAXINT + 42 , dummy_write )
185180 m .dump_double (xmlrpclib .MININT - 42 , dummy_write )
186181
187- @unittest .expectedFailure # TODO: RUSTPYTHON
188182 def test_dump_none (self ):
189183 value = alist + [None ]
190184 arg1 = (alist + [None ],)
@@ -215,7 +209,6 @@ def test_dump_encoding(self):
215209 self .assertEqual (xmlrpclib .loads (strg )[0 ][0 ], value )
216210 self .assertEqual (xmlrpclib .loads (strg )[1 ], methodname )
217211
218- @unittest .expectedFailure # TODO: RUSTPYTHON
219212 def test_dump_bytes (self ):
220213 sample = b"my dog has fleas"
221214 self .assertEqual (sample , xmlrpclib .Binary (sample ))
@@ -258,7 +251,6 @@ def check_loads(self, s, value, **kwargs):
258251 self .assertIs (type (newvalue ), type (value ))
259252 self .assertIsNone (m )
260253
261- @unittest .expectedFailure # TODO: RUSTPYTHON
262254 def test_load_standard_types (self ):
263255 check = self .check_loads
264256 check ('string' , 'string' )
@@ -300,7 +292,6 @@ def test_load_extension_types(self):
300292 check ('<bigdecimal>9876543210.0123456789</bigdecimal>' ,
301293 decimal .Decimal ('9876543210.0123456789' ))
302294
303- @unittest .expectedFailure # TODO: RUSTPYTHON; NameError: name 'expat' is not defined
304295 def test_limit_int (self ):
305296 check = self .check_loads
306297 maxdigits = 5000
@@ -332,7 +323,6 @@ def test_ssl_presence(self):
332323 except OSError :
333324 self .assertTrue (has_ssl )
334325
335- @unittest .expectedFailure # TODO: RUSTPYTHON
336326 def test_keepalive_disconnect (self ):
337327 class RequestHandler (http .server .BaseHTTPRequestHandler ):
338328 protocol_version = "HTTP/1.1"
@@ -472,7 +462,6 @@ def test_repr(self):
472462 self .assertEqual (repr (f ), "<Fault 42: 'Test Fault'>" )
473463 self .assertEqual (repr (f ), str (f ))
474464
475- @unittest .expectedFailure # TODO: RUSTPYTHON
476465 def test_dump_fault (self ):
477466 f = xmlrpclib .Fault (42 , 'Test Fault' )
478467 s = xmlrpclib .dumps ((f ,))
@@ -820,7 +809,6 @@ def tearDown(self):
820809 xmlrpc .server .SimpleXMLRPCServer ._send_traceback_header = False
821810
822811class SimpleServerTestCase (BaseServerTestCase ):
823- @unittest .expectedFailure # TODO: RUSTPYTHON
824812 def test_simple1 (self ):
825813 try :
826814 p = xmlrpclib .ServerProxy (URL )
@@ -831,7 +819,6 @@ def test_simple1(self):
831819 # protocol error; provide additional information in test output
832820 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
833821
834- @unittest .expectedFailure # TODO: RUSTPYTHON
835822 def test_nonascii (self ):
836823 start_string = 'P\N{LATIN SMALL LETTER Y WITH CIRCUMFLEX} t'
837824 end_string = 'h\N{LATIN SMALL LETTER O WITH HORN} n'
@@ -860,7 +847,6 @@ def test_client_encoding(self):
860847 # protocol error; provide additional information in test output
861848 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
862849
863- @unittest .expectedFailure # TODO: RUSTPYTHON
864850 def test_nonascii_methodname (self ):
865851 try :
866852 p = xmlrpclib .ServerProxy (URL , encoding = 'ascii' )
@@ -881,7 +867,6 @@ def test_404(self):
881867 self .assertEqual (response .status , 404 )
882868 self .assertEqual (response .reason , 'Not Found' )
883869
884- @unittest .expectedFailure # TODO: RUSTPYTHON
885870 def test_introspection1 (self ):
886871 expected_methods = set (['pow' , 'div' , 'my_function' , 'add' , 'têšt' ,
887872 'system.listMethods' , 'system.methodHelp' ,
@@ -898,7 +883,6 @@ def test_introspection1(self):
898883 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
899884
900885
901- @unittest .expectedFailure # TODO: RUSTPYTHON
902886 def test_introspection2 (self ):
903887 try :
904888 # test _methodHelp()
@@ -911,7 +895,6 @@ def test_introspection2(self):
911895 # protocol error; provide additional information in test output
912896 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
913897
914- @unittest .expectedFailure # TODO: RUSTPYTHON
915898 @make_request_and_skipIf (sys .flags .optimize >= 2 ,
916899 "Docstrings are omitted with -O2 and above" )
917900 def test_introspection3 (self ):
@@ -926,7 +909,6 @@ def test_introspection3(self):
926909 # protocol error; provide additional information in test output
927910 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
928911
929- @unittest .expectedFailure # TODO: RUSTPYTHON
930912 def test_introspection4 (self ):
931913 # the SimpleXMLRPCServer doesn't support signatures, but
932914 # at least check that we can try making the call
@@ -940,7 +922,6 @@ def test_introspection4(self):
940922 # protocol error; provide additional information in test output
941923 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
942924
943- @unittest .expectedFailure # TODO: RUSTPYTHON
944925 def test_multicall (self ):
945926 try :
946927 p = xmlrpclib .ServerProxy (URL )
@@ -958,7 +939,6 @@ def test_multicall(self):
958939 # protocol error; provide additional information in test output
959940 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
960941
961- @unittest .expectedFailure # TODO: RUSTPYTHON
962942 def test_non_existing_multicall (self ):
963943 try :
964944 p = xmlrpclib .ServerProxy (URL )
@@ -980,7 +960,6 @@ def test_non_existing_multicall(self):
980960 # protocol error; provide additional information in test output
981961 self .fail ("%s\n %s" % (e , getattr (e , "headers" , "" )))
982962
983- @unittest .expectedFailure # TODO: RUSTPYTHON
984963 def test_dotted_attribute (self ):
985964 # Raises an AttributeError because private methods are not allowed.
986965 self .assertRaises (AttributeError ,
@@ -991,14 +970,12 @@ def test_dotted_attribute(self):
991970 # This avoids waiting for the socket timeout.
992971 self .test_simple1 ()
993972
994- @unittest .expectedFailure # TODO: RUSTPYTHON
995973 def test_allow_dotted_names_true (self ):
996974 # XXX also need allow_dotted_names_false test.
997975 server = xmlrpclib .ServerProxy ("http://%s:%d/RPC2" % (ADDR , PORT ))
998976 data = server .Fixture .getData ()
999977 self .assertEqual (data , '42' )
1000978
1001- @unittest .expectedFailure # TODO: RUSTPYTHON
1002979 def test_unicode_host (self ):
1003980 server = xmlrpclib .ServerProxy ("http://%s:%d/RPC2" % (ADDR , PORT ))
1004981 self .assertEqual (server .add ("a" , "\xe9 " ), "a\xe9 " )
@@ -1013,7 +990,6 @@ def test_partial_post(self):
1013990 'Accept-Encoding: identity\r \n '
1014991 'Content-Length: 0\r \n \r \n ' .encode ('ascii' ))
1015992
1016- @unittest .expectedFailure # TODO: RUSTPYTHON
1017993 def test_context_manager (self ):
1018994 with xmlrpclib .ServerProxy (URL ) as server :
1019995 server .add (2 , 3 )
@@ -1022,7 +998,6 @@ def test_context_manager(self):
1022998 self .assertEqual (server ('transport' )._connection ,
1023999 (None , None ))
10241000
1025- @unittest .expectedFailure # TODO: RUSTPYTHON
10261001 def test_context_manager_method_error (self ):
10271002 try :
10281003 with xmlrpclib .ServerProxy (URL ) as server :
@@ -1057,13 +1032,11 @@ def test_server_encoding(self):
10571032class MultiPathServerTestCase (BaseServerTestCase ):
10581033 threadFunc = staticmethod (http_multi_server )
10591034 request_count = 2
1060- @unittest .expectedFailure # TODO: RUSTPYTHON
10611035 def test_path1 (self ):
10621036 p = xmlrpclib .ServerProxy (URL + "/foo" )
10631037 self .assertEqual (p .pow (6 ,8 ), 6 ** 8 )
10641038 self .assertRaises (xmlrpclib .Fault , p .add , 6 , 8 )
10651039
1066- @unittest .expectedFailure # TODO: RUSTPYTHON
10671040 def test_path2 (self ):
10681041 p = xmlrpclib .ServerProxy (URL + "/foo/bar" )
10691042 self .assertEqual (p .add (6 ,8 ), 6 + 8 )
@@ -1151,7 +1124,6 @@ def setUp(self):
11511124#A test case that verifies that a server using the HTTP/1.1 keep-alive mechanism
11521125#does indeed serve subsequent requests on the same connection
11531126class KeepaliveServerTestCase1 (BaseKeepaliveServerTestCase ):
1154- @unittest .expectedFailure # TODO: RUSTPYTHON
11551127 def test_two (self ):
11561128 p = xmlrpclib .ServerProxy (URL )
11571129 #do three requests.
@@ -1235,7 +1207,6 @@ def send_content(self, connection, body):
12351207 def setUp (self ):
12361208 BaseServerTestCase .setUp (self )
12371209
1238- @unittest .expectedFailure # TODO: RUSTPYTHON
12391210 def test_gzip_request (self ):
12401211 t = self .Transport ()
12411212 t .encode_threshold = None
@@ -1259,7 +1230,6 @@ def test_bad_gzip_request(self):
12591230 p .pow (6 , 8 )
12601231 p ("close" )()
12611232
1262- @unittest .expectedFailure # TODO: RUSTPYTHON
12631233 def test_gzip_response (self ):
12641234 t = self .Transport ()
12651235 p = xmlrpclib .ServerProxy (URL , transport = t )
@@ -1318,15 +1288,13 @@ def assertContainsAdditionalHeaders(self, headers, additional):
13181288 for key , value in additional .items ():
13191289 self .assertEqual (headers .get (key ), value )
13201290
1321- @unittest .expectedFailure # TODO: RUSTPYTHON
13221291 def test_header (self ):
13231292 p = xmlrpclib .ServerProxy (URL , headers = [('X-Test' , 'foo' )])
13241293 self .assertEqual (p .pow (6 , 8 ), 6 ** 8 )
13251294
13261295 headers = self .RequestHandler .test_headers
13271296 self .assertContainsAdditionalHeaders (headers , {'X-Test' : 'foo' })
13281297
1329- @unittest .expectedFailure # TODO: RUSTPYTHON
13301298 def test_header_many (self ):
13311299 p = xmlrpclib .ServerProxy (
13321300 URL , headers = [('X-Test' , 'foo' ), ('X-Test-Second' , 'bar' )])
@@ -1336,23 +1304,20 @@ def test_header_many(self):
13361304 self .assertContainsAdditionalHeaders (
13371305 headers , {'X-Test' : 'foo' , 'X-Test-Second' : 'bar' })
13381306
1339- @unittest .expectedFailure # TODO: RUSTPYTHON
13401307 def test_header_empty (self ):
13411308 p = xmlrpclib .ServerProxy (URL , headers = [])
13421309 self .assertEqual (p .pow (6 , 8 ), 6 ** 8 )
13431310
13441311 headers = self .RequestHandler .test_headers
13451312 self .assertContainsAdditionalHeaders (headers , {})
13461313
1347- @unittest .expectedFailure # TODO: RUSTPYTHON
13481314 def test_header_tuple (self ):
13491315 p = xmlrpclib .ServerProxy (URL , headers = (('X-Test' , 'foo' ),))
13501316 self .assertEqual (p .pow (6 , 8 ), 6 ** 8 )
13511317
13521318 headers = self .RequestHandler .test_headers
13531319 self .assertContainsAdditionalHeaders (headers , {'X-Test' : 'foo' })
13541320
1355- @unittest .expectedFailure # TODO: RUSTPYTHON
13561321 def test_header_items (self ):
13571322 p = xmlrpclib .ServerProxy (URL , headers = {'X-Test' : 'foo' }.items ())
13581323 self .assertEqual (p .pow (6 , 8 ), 6 ** 8 )
@@ -1411,7 +1376,6 @@ def tearDown(self):
14111376 default_class = http .client .HTTPMessage
14121377 xmlrpc .server .SimpleXMLRPCRequestHandler .MessageClass = default_class
14131378
1414- @unittest .expectedFailure # TODO: RUSTPYTHON
14151379 def test_basic (self ):
14161380 # check that flag is false by default
14171381 flagval = xmlrpc .server .SimpleXMLRPCServer ._send_traceback_header
@@ -1506,7 +1470,6 @@ def test_cgi_get(self):
15061470 self .assertEqual (message , 'Bad Request' )
15071471
15081472
1509- @unittest .expectedFailure # TODO: RUSTPYTHON
15101473 def test_cgi_xmlrpc_response (self ):
15111474 data = """<?xml version='1.0'?>
15121475 <methodCall>
@@ -1552,7 +1515,6 @@ def test_cgi_xmlrpc_response(self):
15521515
15531516class UseBuiltinTypesTestCase (unittest .TestCase ):
15541517
1555- @unittest .expectedFailure # TODO: RUSTPYTHON
15561518 def test_use_builtin_types (self ):
15571519 # SimpleXMLRPCDispatcher.__init__ accepts use_builtin_types, which
15581520 # makes all dispatch of binary data as bytes instances, and all
0 commit comments