summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httplib.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-04-08 22:34:02 (GMT)
committerGitHub <noreply@github.com>2019-04-08 22:34:02 (GMT)
commiteb7e29f2a9d075accc1ab3faf3612ac44f5e2183 (patch)
tree6d4d31556465bc34e12de0ebc98dd751cb0fc09a /Lib/test/test_httplib.py
parent58721a903074d28151d008d8990c98fc31d1e798 (diff)
downloadcpython-eb7e29f2a9d075accc1ab3faf3612ac44f5e2183.zip
cpython-eb7e29f2a9d075accc1ab3faf3612ac44f5e2183.tar.gz
cpython-eb7e29f2a9d075accc1ab3faf3612ac44f5e2183.tar.bz2
bpo-35934: Add socket.create_server() utility function (GH-11784)
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r--Lib/test/test_httplib.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index 4755f8b..6591461 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -1118,11 +1118,8 @@ class BasicTest(TestCase):
def test_response_fileno(self):
# Make sure fd returned by fileno is valid.
- serv = socket.socket(
- socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
+ serv = socket.create_server((HOST, 0))
self.addCleanup(serv.close)
- serv.bind((HOST, 0))
- serv.listen()
result = None
def run_server():