]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362) (GH-7374)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 4 Jun 2018 03:39:00 +0000 (06:39 +0300)
committerNed Deily <nad@python.org>
Mon, 4 Jun 2018 03:39:00 +0000 (23:39 -0400)
It depended on a global variable set by other tests..
(cherry picked from commit 7cfd8c6a1b53a7dbdea14b6f414f2629dcd130a2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_xmlrpc.py

index 97d9e8f789cd31ab792050b6eba79771d5f480a0..36b3be67fd6b3f1b19ff4e3201c78acf49bd2dc0 100644 (file)
@@ -854,13 +854,9 @@ class GzipServerTestCase(BaseServerTestCase):
 class ServerProxyTestCase(unittest.TestCase):
     def setUp(self):
         unittest.TestCase.setUp(self)
-        if threading:
-            self.url = URL
-        else:
-            # Without threading, http_server() and http_multi_server() will not
-            # be executed and URL is still equal to None. 'http://' is a just
-            # enough to choose the scheme (HTTP)
-            self.url = 'http://'
+        # Actual value of the URL doesn't matter if it is a string in
+        # the correct format.
+        self.url = 'http://fake.localhost'
 
     def test_close(self):
         p = xmlrpclib.ServerProxy(self.url)