Commit 4d4cacbc authored by Nick Coghlan's avatar Nick Coghlan

Fix broken socket.makefile emulation in test_urllib

parent ab16ddaa
......@@ -146,7 +146,8 @@ class urlopen_HttpTests(unittest.TestCase):
def fakehttp(self, fakedata):
class FakeSocket(io.BytesIO):
def sendall(self, str): pass
def makefile(self, mode, name): return self
def makefile(self, *args, **kwds):
return self
def read(self, amt=None):
if self.closed: return b""
return io.BytesIO.read(self, amt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment