(app, client)
| 156 | |
| 157 | |
| 158 | def test_session_transactions(app, client): |
| 159 | @app.route("/") |
| 160 | def index(): |
| 161 | return str(flask.session["foo"]) |
| 162 | |
| 163 | with client: |
| 164 | with client.session_transaction() as sess: |
| 165 | assert len(sess) == 0 |
| 166 | sess["foo"] = [42] |
| 167 | assert len(sess) == 1 |
| 168 | rv = client.get("/") |
| 169 | assert rv.data == b"[42]" |
| 170 | with client.session_transaction() as sess: |
| 171 | assert len(sess) == 1 |
| 172 | assert sess["foo"] == [42] |
| 173 | |
| 174 | |
| 175 | def test_session_transactions_no_null_sessions(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…