Commit 61d0d60e authored by Brian Curtin's avatar Brian Curtin

Fix ResourceWarning for an unclosed socket.

test_return_header_keep_alive - Added a cleanup call for the socket.
parent 076623bf
......@@ -182,6 +182,7 @@ class BaseHTTPServerTestCase(BaseTestCase):
res = self.con.getresponse()
self.assertEqual(res.getheader('Connection'), 'keep-alive')
self.con.request('TEST', '/')
self.addCleanup(self.con.close)
def test_internal_key_error(self):
self.con.request('KEYERROR', '/')
......
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