MCPcopy Create free account
hub / github.com/pallets/flask / test_session_stored_last

Function test_session_stored_last

tests/test_basic.py:427–438  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

425
426
427def test_session_stored_last(app, client):
428 @app.after_request
429 def modify_session(response):
430 flask.session["foo"] = 42
431 return response
432
433 @app.route("/")
434 def dump_session_contents():
435 return repr(flask.session.get("foo"))
436
437 assert client.get("/").data == b"None"
438 assert client.get("/").data == b"42"
439
440
441def test_session_special_types(app, client):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected