forked from orbit-oss/flask
wait until app ctx is ready before matching url
`RequestContext.match_request` is moved from `__init__` to `push`. This causes matching to happen later, when the app context is available. This enables URL converters that use things such as the database.
This commit is contained in:
parent
29111a3259
commit
1ff98a2d21
4 changed files with 41 additions and 24 deletions
|
|
@ -153,7 +153,6 @@ def test_blueprint_with_subdomain():
|
|||
|
||||
ctx = app.test_request_context("/", subdomain="xxx")
|
||||
assert ctx.request.url == "http://xxx.example.com:1234/foo/"
|
||||
assert ctx.request.blueprint == bp.name
|
||||
|
||||
rv = client.get("/", subdomain="xxx")
|
||||
assert rv.data == b"http://xxx.example.com:1234/foo/"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue