Added asgi_wrapper plugin hook, closes #520

This commit is contained in:
Simon Willison 2019-07-02 20:57:28 -07:00
commit 93bfa26bfd
5 changed files with 78 additions and 1 deletions

View file

@ -162,3 +162,8 @@ def test_plugins_extra_body_script(app_client, path, expected_extra_body_script)
json_data = r.search(app_client.get(path).body.decode("utf8")).group(1)
actual_data = json.loads(json_data)
assert expected_extra_body_script == actual_data
def test_plugins_asgi_wrapper(app_client):
response = app_client.get("/fixtures")
assert "fixtures" == response.headers["x-databases"]