MCPcopy Create free account
hub / github.com/pallets/flask / test_run_server_port

Function test_run_server_port

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

Source from the content-addressed store, hash-verified

1855
1856
1857def test_run_server_port(monkeypatch, app):
1858 rv = {}
1859
1860 # Mocks werkzeug.serving.run_simple method
1861 def run_simple_mock(hostname, port, application, *args, **kwargs):
1862 rv["result"] = f"running on {hostname}:{port} ..."
1863
1864 monkeypatch.setattr(werkzeug.serving, "run_simple", run_simple_mock)
1865 hostname, port = "localhost", 8000
1866 app.run(hostname, port, debug=True)
1867 assert rv["result"] == f"running on {hostname}:{port} ..."
1868
1869
1870@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected