mirror of
https://github.com/simonw/datasette.git
synced 2026-09-28 12:54:10 +02:00
Port to httpx2, refs #2879
This commit is contained in:
parent
0337fba234
commit
f712559886
10 changed files with 62 additions and 64 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import socket
|
||||
|
||||
import httpx
|
||||
import httpx2
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.serial
|
||||
def test_serve_localhost_http(ds_localhost_http_server):
|
||||
response = httpx.get("http://localhost:8041/_memory.json")
|
||||
response = httpx2.get("http://localhost:8041/_memory.json")
|
||||
assert {
|
||||
"database": "_memory",
|
||||
"path": "/_memory",
|
||||
|
|
@ -20,8 +20,8 @@ def test_serve_localhost_http(ds_localhost_http_server):
|
|||
)
|
||||
def test_serve_unix_domain_socket(ds_unix_domain_socket_server):
|
||||
_, uds = ds_unix_domain_socket_server
|
||||
transport = httpx.HTTPTransport(uds=uds)
|
||||
client = httpx.Client(transport=transport)
|
||||
transport = httpx2.HTTPTransport(uds=uds)
|
||||
client = httpx2.Client(transport=transport)
|
||||
response = client.get("http://localhost/_memory.json")
|
||||
assert {
|
||||
"database": "_memory",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue