MCPcopy Create free account
hub / github.com/pallets/flask / test_environ_defaults

Function test_environ_defaults

tests/test_testing.py:30–39  ·  view source on GitHub ↗
(app, client, app_ctx, req_ctx)

Source from the content-addressed store, hash-verified

28
29
30def test_environ_defaults(app, client, app_ctx, req_ctx):
31 @app.route("/")
32 def index():
33 return flask.request.url
34
35 ctx = app.test_request_context()
36 assert ctx.request.url == "http://localhost/"
37 with client:
38 rv = client.get("/")
39 assert rv.data == b"http://localhost/"
40
41
42def test_environ_base_default(app, client):

Callers

nothing calls this directly

Calls 2

test_request_contextMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected