From 77553ab531c6a98c3d06b7ba4158b06ed0af8c69 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Sat, 4 Aug 2007 19:23:09 +0000 Subject: Fix test for new version of urllib that uses HTTPConnection directly. Changes the way the httplib classes are stubbed out. --- Lib/test/test_urllib.py | 6 +++--- 1 file 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!") -- cgit v0.12