MCPcopy
hub / github.com/pallets/flask / test_session_transactions_no_null_sessions

Function test_session_transactions_no_null_sessions

tests/test_testing.py:175–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173
174
175def test_session_transactions_no_null_sessions():
176 app = flask.Flask(__name__)
177
178 with app.test_client() as c:
179 with pytest.raises(RuntimeError) as e:
180 with c.session_transaction():
181 pass
182 assert "Session backend did not open a session" in str(e.value)
183
184
185def test_session_transactions_keep_context(app, client, req_ctx):

Callers

nothing calls this directly

Calls 2

test_clientMethod · 0.95
session_transactionMethod · 0.80

Tested by

no test coverage detected