summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_urllib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index a31bb52..dde5d58 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -111,11 +111,11 @@ class urlopen_HttpTests(unittest.TestCase):
class FakeHTTPConnection(httplib.HTTPConnection):
def connect(self):
self.sock = FakeSocket(fakedata)
- assert httplib.HTTP._connection_class == httplib.HTTPConnection
- httplib.HTTP._connection_class = FakeHTTPConnection
+ self._connection_class = httplib.HTTPConnection
+ httplib.HTTPConnection = FakeHTTPConnection
def unfakehttp(self):
- httplib.HTTP._connection_class = httplib.HTTPConnection
+ httplib.HTTPConnection = self._connection_class
def test_read(self):
self.fakehttp(b"Hello!")