test_flash_signal() — flask Function Reference
Architecture documentation for the test_flash_signal() function in test_signals.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 3912594e_71f3_11a4_15b8_4d437f238f75["test_flash_signal()"] a3094b63_9b33_613c_f8a0_440ab19800e5["test_signals.py"] 3912594e_71f3_11a4_15b8_4d437f238f75 -->|defined in| a3094b63_9b33_613c_f8a0_440ab19800e5 style 3912594e_71f3_11a4_15b8_4d437f238f75 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_signals.py lines 139–160
def test_flash_signal(app):
@app.route("/")
def index():
flask.flash("This is a flash message", category="notice")
return flask.redirect("/other")
recorded = []
def record(sender, message, category):
recorded.append((message, category))
flask.message_flashed.connect(record, app)
try:
client = app.test_client()
with client.session_transaction():
client.get("/")
assert len(recorded) == 1
message, category = recorded[0]
assert message == "This is a flash message"
assert category == "notice"
finally:
flask.message_flashed.disconnect(record, app)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_flash_signal() do?
test_flash_signal() is a function in the flask codebase, defined in tests/test_signals.py.
Where is test_flash_signal() defined?
test_flash_signal() is defined in tests/test_signals.py at line 139.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free