Merge test_xmlrpc_net fixes (issue #13434)

This commit is contained in:
Antoine Pitrou 2011-11-28 21:15:22 +01:00
commit 1439c77417
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ class CurrentTimeTest(unittest.TestCase):
def test_current_time(self): def test_current_time(self):
# Get the current time from xmlrpc.com. This code exercises # Get the current time from xmlrpc.com. This code exercises
# the minimal HTTP functionality in xmlrpclib. # the minimal HTTP functionality in xmlrpclib.
self.skipTest("time.xmlrpc.com is unreliable")
server = xmlrpclib.ServerProxy("http://time.xmlrpc.com/RPC2") server = xmlrpclib.ServerProxy("http://time.xmlrpc.com/RPC2")
try: try:
t0 = server.currentTime.getCurrentTime() t0 = server.currentTime.getCurrentTime()
@ -38,13 +39,13 @@ class CurrentTimeTest(unittest.TestCase):
def test_python_builders(self): def test_python_builders(self):
# Get the list of builders from the XMLRPC buildbot interface at # Get the list of builders from the XMLRPC buildbot interface at
# python.org. # python.org.
self.skipTest("XMLRPC interface removed in Buildbot 0.8.2")
server = xmlrpclib.ServerProxy("http://www.python.org/dev/buildbot/all/xmlrpc/") server = xmlrpclib.ServerProxy("http://www.python.org/dev/buildbot/all/xmlrpc/")
try: try:
builders = server.getAllBuilders() builders = server.getAllBuilders()
except socket.error as e: except socket.error as e:
self.skipTest("network error: %s" % e) self.skipTest("network error: %s" % e)
return return
self.addCleanup(lambda: server('close')())
# Perform a minimal sanity check on the result, just to be sure # Perform a minimal sanity check on the result, just to be sure
# the request means what we think it means. # the request means what we think it means.