diff options
author | Georg Brandl <georg@python.org> | 2008-05-26 16:32:26 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-26 16:32:26 (GMT) |
commit | 2442015af26321083d4a2d75c096c8b732f049b2 (patch) | |
tree | 24cb8bc1fd46815ecc6e795cfcc008e7a576c672 /Lib/test/test_urllib.py | |
parent | 744c2cd32585c1aeb1b78063cc6dda740d59c0c0 (diff) | |
download | cpython-2442015af26321083d4a2d75c096c8b732f049b2.zip cpython-2442015af26321083d4a2d75c096c8b732f049b2.tar.gz cpython-2442015af26321083d4a2d75c096c8b732f049b2.tar.bz2 |
Create http package. #2883.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 7db281c..b14510f 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -1,7 +1,7 @@ """Regresssion tests for urllib""" import urllib -import httplib +import http.client import io import unittest from test import support @@ -107,14 +107,14 @@ class urlopen_HttpTests(unittest.TestCase): def readline(self, length=None): if self.closed: return b"" return io.BytesIO.readline(self, length) - class FakeHTTPConnection(httplib.HTTPConnection): + class FakeHTTPConnection(http.client.HTTPConnection): def connect(self): self.sock = FakeSocket(fakedata) - self._connection_class = httplib.HTTPConnection - httplib.HTTPConnection = FakeHTTPConnection + self._connection_class = http.client.HTTPConnection + http.client.HTTPConnection = FakeHTTPConnection def unfakehttp(self): - httplib.HTTPConnection = self._connection_class + http.client.HTTPConnection = self._connection_class def test_read(self): self.fakehttp(b"Hello!") |