summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r--Lib/test/test_httplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index 18fde4a..2d61c46 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -10,7 +10,7 @@ from test import test_support
class FakeSocket:
def __init__(self, text, fileclass=io.BytesIO):
if isinstance(text, str):
- text = bytes(text)
+ text = text.encode("ascii")
self.text = text
self.fileclass = fileclass
self.data = b''