11"""Tests for SemanticProxyService."""
22
33import json
4+ from typing import Any
45
56import httpx
67import pytest
@@ -26,7 +27,7 @@ def service(
2627
2728
2829@pytest .fixture
29- def sample_response_json () -> dict :
30+ def sample_response_json () -> dict [ str , Any ] :
3031 return {
3132 "response" : [
3233 {
@@ -76,7 +77,7 @@ def test_returns_typed_response(
7677 base_url : str ,
7778 org : str ,
7879 tenant : str ,
79- sample_response_json : dict ,
80+ sample_response_json : dict [ str , Any ] ,
8081 ) -> None :
8182 httpx_mock .add_response (
8283 url = f"{ base_url } { org } { tenant } /semanticproxy_/api/pii-detection" ,
@@ -110,7 +111,7 @@ async def test_returns_typed_response(
110111 base_url : str ,
111112 org : str ,
112113 tenant : str ,
113- sample_response_json : dict ,
114+ sample_response_json : dict [ str , Any ] ,
114115 ) -> None :
115116 httpx_mock .add_response (
116117 url = f"{ base_url } { org } { tenant } /semanticproxy_/api/pii-detection" ,
@@ -141,7 +142,7 @@ async def test_request_payload_uses_aliases(
141142 base_url : str ,
142143 org : str ,
143144 tenant : str ,
144- sample_response_json : dict ,
145+ sample_response_json : dict [ str , Any ] ,
145146 ) -> None :
146147 captured_request : httpx .Request | None = None
147148
@@ -202,7 +203,7 @@ async def test_request_excludes_none_fields(
202203 base_url : str ,
203204 org : str ,
204205 tenant : str ,
205- sample_response_json : dict ,
206+ sample_response_json : dict [ str , Any ] ,
206207 ) -> None :
207208 captured_request : httpx .Request | None = None
208209
@@ -237,7 +238,7 @@ async def test_url_is_tenant_scoped(
237238 base_url : str ,
238239 org : str ,
239240 tenant : str ,
240- sample_response_json : dict ,
241+ sample_response_json : dict [ str , Any ] ,
241242 ) -> None :
242243 captured_request : httpx .Request | None = None
243244
0 commit comments