Move HTTPS test to a bash script

See https://github.com/simonw/datasette/issues/1955#issuecomment-1356627931
This commit is contained in:
Simon Willison 2022-12-17 18:33:07 -08:00
commit d1d369456a
3 changed files with 33 additions and 46 deletions

View file

@ -13,17 +13,6 @@ def test_serve_localhost_http(ds_localhost_http_server):
}.items() <= response.json().items()
@pytest.mark.serial
def test_serve_localhost_https(ds_localhost_https_server):
_, client_cert = ds_localhost_https_server
response = httpx.get("https://localhost:8042/_memory.json", verify=client_cert)
assert {
"database": "_memory",
"path": "/_memory",
"tables": [],
}.items() <= response.json().items()
@pytest.mark.serial
@pytest.mark.skipif(
not hasattr(socket, "AF_UNIX"), reason="Requires socket.AF_UNIX support"