Skip to content

Commit

Permalink
Tests for --ssl-keyfile and --ssl-certfile, refs #1221
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Feb 12, 2021
1 parent eda652c commit 9603d89
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_cli_serve_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import httpx


def test_serve_localhost_http(ds_localhost_http_server):
response = httpx.get("http://localhost:8041/_memory.json")
assert {
"database": "_memory",
"path": "/_memory",
"tables": [],
}.items() <= response.json().items()


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()

0 comments on commit 9603d89

Please sign in to comment.