(app, client)
| 267 | |
| 268 | |
| 269 | def test_session_using_application_root(app, client): |
| 270 | class PrefixPathMiddleware: |
| 271 | def __init__(self, app, prefix): |
| 272 | self.app = app |
| 273 | self.prefix = prefix |
| 274 | |
| 275 | def __call__(self, environ, start_response): |
| 276 | environ["SCRIPT_NAME"] = self.prefix |
| 277 | return self.app(environ, start_response) |
| 278 | |
| 279 | app.wsgi_app = PrefixPathMiddleware(app.wsgi_app, "/bar") |
| 280 | app.config.update(APPLICATION_ROOT="/bar") |
| 281 | |
| 282 | @app.route("/") |
| 283 | def index(): |
| 284 | flask.session["testing"] = 42 |
| 285 | return "Hello World" |
| 286 | |
| 287 | rv = client.get("/", "http://example.com:8080/") |
| 288 | assert "path=/bar" in rv.headers["set-cookie"].lower() |
| 289 | |
| 290 | |
| 291 | def test_session_using_session_settings(app, client): |
nothing calls this directly
no test coverage detected