Support OPTIONS without 500, closes #1001

This commit is contained in:
Simon Willison 2020-10-08 18:43:53 -07:00
commit 7249ac5ca0
2 changed files with 9 additions and 0 deletions

View file

@ -52,6 +52,12 @@ def test_http_head(app_client):
assert response.status == 200
def test_homepage_options(app_client):
response = app_client.get("/", method="OPTIONS")
assert response.status == 405
assert response.text == "Method not allowed"
def test_favicon(app_client):
response = app_client.get("/favicon.ico")
assert response.status == 200