Home / Function/ test_run_server_port() — flask Function Reference

test_run_server_port() — flask Function Reference

Architecture documentation for the test_run_server_port() function in test_basic.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  13e76083_8000_5c71_d6df_b970a63c729a["test_run_server_port()"]
  85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"]
  13e76083_8000_5c71_d6df_b970a63c729a -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f
  style 13e76083_8000_5c71_d6df_b970a63c729a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_basic.py lines 1869–1879

def test_run_server_port(monkeypatch, app):
    rv = {}

    # Mocks werkzeug.serving.run_simple method
    def run_simple_mock(hostname, port, application, *args, **kwargs):
        rv["result"] = f"running on {hostname}:{port} ..."

    monkeypatch.setattr(werkzeug.serving, "run_simple", run_simple_mock)
    hostname, port = "localhost", 8000
    app.run(hostname, port, debug=True)
    assert rv["result"] == f"running on {hostname}:{port} ..."

Subdomains

Defined In

Frequently Asked Questions

What does test_run_server_port() do?
test_run_server_port() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_run_server_port() defined?
test_run_server_port() is defined in tests/test_basic.py at line 1869.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free