Support non-async view functions, closes #867

This commit is contained in:
Simon Willison 2020-06-27 11:30:34 -07:00
commit 4b142862f2
4 changed files with 33 additions and 10 deletions

View file

@ -565,7 +565,12 @@ def test_actor_json(app_client):
@pytest.mark.parametrize(
"path,body", [("/one/", "2"), ("/two/Ray?greeting=Hail", "Hail Ray"),]
"path,body",
[
("/one/", "2"),
("/two/Ray?greeting=Hail", "Hail Ray"),
("/not-async/", "This was not async"),
],
)
def test_register_routes(app_client, path, body):
response = app_client.get(path)