MCPcopy
hub / github.com/tornadoweb/tornado / test_request_close

Method test_request_close

tornado/test/httpserver_test.py:998–1007  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

996
997 @gen_test
998 def test_request_close(self):
999 yield self.connect()
1000 self.stream.write(
1001 b"GET / HTTP/1.1\r\nHost:127.0.0.1\r\nConnection: close\r\n\r\n"
1002 )
1003 yield self.read_response()
1004 data = yield self.stream.read_until_close()
1005 self.assertTrue(not data)
1006 self.assertEqual(self.headers["Connection"], "close")
1007 self.close()
1008
1009 # keepalive is supported for http 1.0 too, but it's opt-in
1010 @gen_test

Callers

nothing calls this directly

Calls 5

connectMethod · 0.95
read_responseMethod · 0.95
closeMethod · 0.95
read_until_closeMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected