Fix http tests on Python 3.

This commit is contained in:
Valentin Lorentz 2015-08-15 14:07:01 +02:00
parent 0254d7b84d
commit d56539a0dd

View File

@ -603,6 +603,8 @@ class FakeHTTPConnection(HTTPConnection):
self.rfile = rfile
self.wfile = wfile
def send(self, data):
if minisix.PY3 and isinstance(data, bytes):
data = data.decode()
self.wfile.write(data)
#def putheader(self, name, value):
# self._headers[name] = value