MCPcopy
hub / github.com/pallets/flask / test_run_server_port

Function test_run_server_port

tests/test_basic.py:1885–1895  ·  view source on GitHub ↗
(monkeypatch, app)

Source from the content-addressed store, hash-verified

1883
1884
1885def test_run_server_port(monkeypatch, app):
1886 rv = {}
1887
1888 # Mocks werkzeug.serving.run_simple method
1889 def run_simple_mock(hostname, port, application, *args, **kwargs):
1890 rv["result"] = f"running on {hostname}:{port} ..."
1891
1892 monkeypatch.setattr(werkzeug.serving, "run_simple", run_simple_mock)
1893 hostname, port = "localhost", 8000
1894 app.run(hostname, port, debug=True)
1895 assert rv["result"] == f"running on {hostname}:{port} ..."
1896
1897
1898@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected