diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-05-16 01:07:13 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-05-16 01:07:13 (GMT) |
commit | ce6e06874b235f7825888c20fd2c6f4670a4aeba (patch) | |
tree | cbab88edff943bca30d70f2ec8622616636c01ba /Lib/test/test_urllib.py | |
parent | f95455da4c3c61a302d62322a4bcb17a629efd4b (diff) | |
download | cpython-ce6e06874b235f7825888c20fd2c6f4670a4aeba.zip cpython-ce6e06874b235f7825888c20fd2c6f4670a4aeba.tar.gz cpython-ce6e06874b235f7825888c20fd2c6f4670a4aeba.tar.bz2 |
Issue #14132: Fix redirect handling when target is just a query string
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 49e2a2c..5d05f8d 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -1,4 +1,4 @@ -"""Regresssion tests for urllib""" +"""Regresssion tests for what was in Python 2's "urllib" module""" import urllib.parse import urllib.request @@ -86,10 +86,11 @@ def fakehttp(fakedata): # buffer to store data for verification in urlopen tests. buf = None - fakesock = FakeSocket(fakedata) def connect(self): - self.sock = self.fakesock + self.sock = FakeSocket(self.fakedata) + type(self).fakesock = self.sock + FakeHTTPConnection.fakedata = fakedata return FakeHTTPConnection |