MCPcopy Index your code
hub / github.com/blacklanternsecurity/bbot / bbot_httpserver_ssl

Function bbot_httpserver_ssl

bbot/test/conftest.py:78–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76
77@pytest.fixture
78def bbot_httpserver_ssl():
79 context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
80 current_dir = Path(__file__).parent
81 keyfile = str(current_dir / "testsslkey.pem")
82 certfile = str(current_dir / "testsslcert.pem")
83 context.load_cert_chain(certfile, keyfile)
84 server = HTTPServer(host="127.0.0.1", port=9999, ssl_context=context, threaded=True)
85 server.start()
86
87 yield server
88
89 server.clear()
90 stop_server(server) # Ensure the server is fully stopped
91
92 server.check_assertions()
93 server.clear()
94
95
96def should_mock(request):

Callers

nothing calls this directly

Calls 3

stop_serverFunction · 0.85
clearMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…