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

Method setUp

tornado/test/httpclient_test.py:194–201  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192 )
193
194 def setUp(self):
195 super().setUp()
196
197 # Add a second port (serving the same app) to the HTTP server, so we can test the effects
198 # of redirects that span different origins.
199 sock, port = bind_unused_port()
200 self.http_server.add_socket(sock)
201 self.__port2 = port
202
203 def get_url2(self, path: str) -> str:
204 return f"{self.get_protocol()}://127.0.0.1:{self.__port2}{path}"

Callers

nothing calls this directly

Calls 3

bind_unused_portFunction · 0.90
add_socketMethod · 0.80
setUpMethod · 0.45

Tested by

no test coverage detected