test_session_special_types() — flask Function Reference
Architecture documentation for the test_session_special_types() function in test_basic.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 027b4ac8_d97d_91f1_98cf_983b8bc3ee9e["test_session_special_types()"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"] 027b4ac8_d97d_91f1_98cf_983b8bc3ee9e -->|defined in| 85bc4fb5_d1d7_a135_020d_69e052c12c0f style 027b4ac8_d97d_91f1_98cf_983b8bc3ee9e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_basic.py lines 448–476
def test_session_special_types(app, client):
now = datetime.now(timezone.utc).replace(microsecond=0)
the_uuid = uuid.uuid4()
@app.route("/")
def dump_session_contents():
flask.session["t"] = (1, 2, 3)
flask.session["b"] = b"\xff"
flask.session["m"] = Markup("<html>")
flask.session["u"] = the_uuid
flask.session["d"] = now
flask.session["t_tag"] = {" t": "not-a-tuple"}
flask.session["di_t_tag"] = {" t__": "not-a-tuple"}
flask.session["di_tag"] = {" di": "not-a-dict"}
return "", 204
with client:
client.get("/")
s = flask.session
assert s["t"] == (1, 2, 3)
assert type(s["b"]) is bytes # noqa: E721
assert s["b"] == b"\xff"
assert type(s["m"]) is Markup # noqa: E721
assert s["m"] == Markup("<html>")
assert s["u"] == the_uuid
assert s["d"] == now
assert s["t_tag"] == {" t": "not-a-tuple"}
assert s["di_t_tag"] == {" t__": "not-a-tuple"}
assert s["di_tag"] == {" di": "not-a-dict"}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_session_special_types() do?
test_session_special_types() is a function in the flask codebase, defined in tests/test_basic.py.
Where is test_session_special_types() defined?
test_session_special_types() is defined in tests/test_basic.py at line 448.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free