(app, client)
| 55 | |
| 56 | |
| 57 | def test_environ_base_modified(app, client): |
| 58 | @app.route("/") |
| 59 | def index(): |
| 60 | flask.g.remote_addr = flask.request.remote_addr |
| 61 | flask.g.user_agent = flask.request.user_agent.string |
| 62 | return "" |
| 63 | |
| 64 | client.environ_base["REMOTE_ADDR"] = "192.168.0.22" |
| 65 | client.environ_base["HTTP_USER_AGENT"] = "Foo" |
| 66 | |
| 67 | with client: |
| 68 | client.get("/") |
| 69 | assert flask.g.remote_addr == "192.168.0.22" |
| 70 | assert flask.g.user_agent == "Foo" |
| 71 | |
| 72 | |
| 73 | def test_client_open_environ(app, client, request): |