Port to httpx2, refs #2879

This commit is contained in:
Simon Willison 2026-08-13 16:22:30 -07:00
commit f712559886
10 changed files with 62 additions and 64 deletions

View file

@ -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",