From 4c18730e71e0b9109312fdfc2295d9c4ab6fbdcb Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 30 Nov 2022 10:29:48 -0800 Subject: [PATCH] Update tests to export 200 for OPTIONS calls, refs #1922 --- tests/test_html.py | 4 ++-- tests/test_internals_datasette_client.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_html.py b/tests/test_html.py index 4f62432f..83086cd4 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -55,8 +55,8 @@ def test_http_head(app_client): def test_homepage_options(app_client): response = app_client.get("/", method="OPTIONS") - assert response.status == 405 - assert response.text == "Method not allowed" + assert response.status == 200 + assert response.text == "ok" def test_favicon(app_client): diff --git a/tests/test_internals_datasette_client.py b/tests/test_internals_datasette_client.py index 497bf475..cbbfa3c3 100644 --- a/tests/test_internals_datasette_client.py +++ b/tests/test_internals_datasette_client.py @@ -15,7 +15,7 @@ async def datasette(app_client): "method,path,expected_status", [ ("get", "/", 200), - ("options", "/", 405), + ("options", "/", 200), ("head", "/", 200), ("put", "/", 405), ("patch", "/", 405),