-
-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for --ssl-keyfile and --ssl-certfile, refs #1221
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |