summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xmlrpc_net.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-10-11 16:09:51 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-10-11 16:09:51 (GMT)
commitaaf17b33a53447f45d799d1165765b60adad8209 (patch)
treee942cc5b86c191bde7ce015962acb92a6cc966c3 /Lib/test/test_xmlrpc_net.py
parent1254b407ac6960ff2594e417d2f1c2c6a1ffc755 (diff)
downloadcpython-aaf17b33a53447f45d799d1165765b60adad8209.zip
cpython-aaf17b33a53447f45d799d1165765b60adad8209.tar.gz
cpython-aaf17b33a53447f45d799d1165765b60adad8209.tar.bz2
#19192: Give up on time.xmlrpc.com as an xmlrpc network test.
time.xmlrpc.com has come and gone over the years, and has been gone again for a while. The test did test one thing that the current xmlrpc tests don't: the use of multiple levels of attribute names in the call. So in addition to removing the network test, we add a test in xmlrpc of dotted name access. There should also be a test for when dotted name access is disallowed, but that requires more extensive test harness refactoring, and in any case was not tested by the network test we are deleting, since it is a server-side setting. This is a slightly simplified version of a patch by Vajrasky Kok.
Diffstat (limited to 'Lib/test/test_xmlrpc_net.py')
-rw-r--r--Lib/test/test_xmlrpc_net.py29
1 files changed, 2 insertions, 27 deletions
diff --git a/Lib/test/test_xmlrpc_net.py b/Lib/test/test_xmlrpc_net.py
index 457e3fb..00aca19 100644
--- a/Lib/test/test_xmlrpc_net.py
+++ b/Lib/test/test_xmlrpc_net.py
@@ -9,32 +9,7 @@ from test import support
import xmlrpc.client as xmlrpclib
-class CurrentTimeTest(unittest.TestCase):
-
- def test_current_time(self):
- # Get the current time from xmlrpc.com. This code exercises
- # the minimal HTTP functionality in xmlrpclib.
- self.skipTest("time.xmlrpc.com is unreliable")
- server = xmlrpclib.ServerProxy("http://time.xmlrpc.com/RPC2")
- try:
- t0 = server.currentTime.getCurrentTime()
- except OSError as e:
- self.skipTest("network error: %s" % e)
- return
-
- # Perform a minimal sanity check on the result, just to be sure
- # the request means what we think it means.
- t1 = xmlrpclib.DateTime()
-
- dt0 = xmlrpclib._datetime_type(t0.value)
- dt1 = xmlrpclib._datetime_type(t1.value)
- if dt0 > dt1:
- delta = dt0 - dt1
- else:
- delta = dt1 - dt0
- # The difference between the system time here and the system
- # time on the server should not be too big.
- self.assertTrue(delta.days <= 1)
+class PythonBuildersTest(unittest.TestCase):
def test_python_builders(self):
# Get the list of builders from the XMLRPC buildbot interface at
@@ -55,7 +30,7 @@ class CurrentTimeTest(unittest.TestCase):
def test_main():
support.requires("network")
- support.run_unittest(CurrentTimeTest)
+ support.run_unittest(PythonBuildersTest)
if __name__ == "__main__":
test_main()