summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-05-16 01:07:13 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-05-16 01:07:13 (GMT)
commitce6e06874b235f7825888c20fd2c6f4670a4aeba (patch)
treecbab88edff943bca30d70f2ec8622616636c01ba /Lib/test/test_urllib.py
parentf95455da4c3c61a302d62322a4bcb17a629efd4b (diff)
downloadcpython-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.py7
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