Home / Function/ test_unique_blueprint_names() — flask Function Reference

test_unique_blueprint_names() — flask Function Reference

Architecture documentation for the test_unique_blueprint_names() function in test_blueprints.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  e200f2a2_d711_b080_63ec_04db0341821f["test_unique_blueprint_names()"]
  4366a441_d387_52f9_ec8d_1c41c71c00a8["test_blueprints.py"]
  e200f2a2_d711_b080_63ec_04db0341821f -->|defined in| 4366a441_d387_52f9_ec8d_1c41c71c00a8
  style e200f2a2_d711_b080_63ec_04db0341821f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_blueprints.py lines 1075–1089

def test_unique_blueprint_names(app, client) -> None:
    bp = flask.Blueprint("bp", __name__)
    bp2 = flask.Blueprint("bp", __name__)

    app.register_blueprint(bp)

    with pytest.raises(ValueError):
        app.register_blueprint(bp)  # same bp, same name, error

    app.register_blueprint(bp, name="again")  # same bp, different name, ok

    with pytest.raises(ValueError):
        app.register_blueprint(bp2)  # different bp, same name, error

    app.register_blueprint(bp2, name="alt")  # different bp, different name, ok

Subdomains

Frequently Asked Questions

What does test_unique_blueprint_names() do?
test_unique_blueprint_names() is a function in the flask codebase, defined in tests/test_blueprints.py.
Where is test_unique_blueprint_names() defined?
test_unique_blueprint_names() is defined in tests/test_blueprints.py at line 1075.

Analyze Your Own Codebase

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

Try Supermodel Free