()
| 203 | |
| 204 | |
| 205 | def test_session_error_pops_context(): |
| 206 | class SessionError(Exception): |
| 207 | pass |
| 208 | |
| 209 | class FailingSessionInterface(SessionInterface): |
| 210 | def open_session(self, app, request): |
| 211 | raise SessionError() |
| 212 | |
| 213 | class CustomFlask(flask.Flask): |
| 214 | session_interface = FailingSessionInterface() |
| 215 | |
| 216 | app = CustomFlask(__name__) |
| 217 | |
| 218 | @app.route("/") |
| 219 | def index(): |
| 220 | # shouldn't get here |
| 221 | AssertionError() |
| 222 | |
| 223 | response = app.test_client().get("/") |
| 224 | assert response.status_code == 500 |
| 225 | assert not flask.request |
| 226 | assert not flask.current_app |
| 227 | |
| 228 | |
| 229 | def test_session_dynamic_cookie_name(): |
nothing calls this directly
no test coverage detected