Home / Function/ test_environ_defaults_from_config() — flask Function Reference

test_environ_defaults_from_config() — flask Function Reference

Architecture documentation for the test_environ_defaults_from_config() function in test_testing.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  af171f00_703a_8624_dc75_a6f3da6860e8["test_environ_defaults_from_config()"]
  8c162ff0_0a8a_d943_77b6_c07b38d297a0["test_testing.py"]
  af171f00_703a_8624_dc75_a6f3da6860e8 -->|defined in| 8c162ff0_0a8a_d943_77b6_c07b38d297a0
  style af171f00_703a_8624_dc75_a6f3da6860e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_testing.py lines 15–27

def test_environ_defaults_from_config(app, client):
    app.config["SERVER_NAME"] = "example.com:1234"
    app.config["APPLICATION_ROOT"] = "/foo"

    @app.route("/")
    def index():
        return flask.request.url

    ctx = app.test_request_context()
    assert ctx.request.url == "http://example.com:1234/foo/"

    rv = client.get("/")
    assert rv.data == b"http://example.com:1234/foo/"

Subdomains

Frequently Asked Questions

What does test_environ_defaults_from_config() do?
test_environ_defaults_from_config() is a function in the flask codebase, defined in tests/test_testing.py.
Where is test_environ_defaults_from_config() defined?
test_environ_defaults_from_config() is defined in tests/test_testing.py at line 15.

Analyze Your Own Codebase

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

Try Supermodel Free