MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / check_close_connection

Method check_close_connection

test/functional/interface_http.py:177–184  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

175
176
177 def check_close_connection(self):
178 self.log.info("Checking close connection after response")
179 conn = BitcoinHTTPConnection(self.node)
180 # Make request with explicit "Connection: close" header
181 response1 = conn.post('/', '{"method": "getbestblockhash"}', connection_header='close').read()
182 assert b'"error":null' in response1
183 # Connection closed after response
184 assert conn.sock_closed()
185
186
187 def check_excessive_request_size(self):

Callers 1

run_testMethod · 0.95

Calls 5

postMethod · 0.95
sock_closedMethod · 0.95
infoMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected