Skip to content

Commit 90cdf87

Browse files
committed
chore: migrate the tests from httpx to httpx2
1 parent 4c27aa4 commit 90cdf87

4 files changed

Lines changed: 45 additions & 30 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ scim2-server = "scim2_server.cli:main"
4444

4545
[dependency-groups]
4646
dev = [
47-
"httpx>=0.27.0",
47+
"httpx2>=2.13.1",
4848
"pytest>=8.2.2",
4949
"pytest-coverage>=0.0",
5050
"prek>=0.1.0",

‎tests/conftest.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import importlib.resources
22
import json
33

4-
import httpx
4+
import httpx2
55
import pytest
66

77
from scim2_server.backend import InMemoryBackend
@@ -43,8 +43,8 @@ def provider(backend, static_data):
4343

4444
@pytest.fixture
4545
def wsgi(provider):
46-
transport = httpx.WSGITransport(app=provider)
47-
client = httpx.Client(transport=transport, base_url="https://scim.example.com")
46+
transport = httpx2.WSGITransport(app=provider)
47+
client = httpx2.Client(transport=transport, base_url="https://scim.example.com")
4848
client.__enter__()
4949
yield client
5050
provider.backend.resources = []

‎tests/integration/test_scim_provider.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22

3-
import httpx
3+
import httpx2
44
import pytest
55
import time_machine
66
from scim2_models import SearchRequest
@@ -12,8 +12,8 @@ class TestSCIMProvider:
1212
"""End-to-end tests for the SCIMProvider."""
1313

1414
def test_location_mapping(self, provider):
15-
transport = httpx.WSGITransport(app=provider, script_name="/foo/bar")
16-
with httpx.Client(
15+
transport = httpx2.WSGITransport(app=provider, script_name="/foo/bar")
16+
with httpx2.Client(
1717
transport=transport, base_url="https://sub.testserver.company:1234"
1818
) as client:
1919
r = client.get("/v2/ServiceProviderConfig")

‎uv.lock‎

Lines changed: 38 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)