Skip to content

Commit 88cb440

Browse files
author
alex-omophub
committed
Update vocab_version in tests for consistency across mock responses and client configurations.
1 parent 5dcb15b commit 88cb440

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def mock_api_response(mock_concept: dict[str, Any]) -> dict[str, Any]:
8686
"meta": {
8787
"request_id": "req_test123",
8888
"timestamp": "2024-12-01T00:00:00Z",
89-
"vocab_release": "2024.4",
89+
"vocab_release": "2024.2",
9090
},
9191
}
9292

tests/unit/test_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ def test_client_custom_max_retries(self, api_key: str) -> None:
197197

198198
def test_client_vocab_version(self, api_key: str) -> None:
199199
"""Test client accepts vocab_version parameter."""
200-
client = OMOPHub(api_key=api_key, vocab_version="2024.4")
200+
client = OMOPHub(api_key=api_key, vocab_version="2024.2")
201201

202-
assert client._vocab_version == "2024.4"
202+
assert client._vocab_version == "2024.2"
203203
# Verify it's passed to request handler
204-
assert client._request._vocab_version == "2024.4"
204+
assert client._request._vocab_version == "2024.2"
205205

206206
client.close()
207207

tests/unit/test_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_vocab_version_header(self) -> None:
103103
http_client=http_client,
104104
base_url="https://api.example.com/v1",
105105
api_key="test_api_key",
106-
vocab_version="2024.4",
106+
vocab_version="2024.2",
107107
)
108108

109109
with respx.mock:
@@ -114,7 +114,7 @@ def test_vocab_version_header(self) -> None:
114114
request_handler.get("/test")
115115

116116
assert "X-Vocab-Version" in route.calls[0].request.headers
117-
assert route.calls[0].request.headers["X-Vocab-Version"] == "2024.4"
117+
assert route.calls[0].request.headers["X-Vocab-Version"] == "2024.2"
118118

119119
def test_request_id_extraction(self, request_handler: Request) -> None:
120120
"""Test request ID is extracted from headers on error."""

0 commit comments

Comments
 (0)