Skip to content

Commit 04b7858

Browse files
chore(internal): codegen related update
1 parent d3a1591 commit 04b7858

File tree

2 files changed

+141
-48
lines changed

2 files changed

+141
-48
lines changed

tests/conftest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ def pytest_collection_modifyitems(items: list[pytest.Function]) -> None:
4545

4646
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
4747

48+
auth_token = "My Auth Token"
49+
4850

4951
@pytest.fixture(scope="session")
5052
def client(request: FixtureRequest) -> Iterator[Codex]:
5153
strict = getattr(request, "param", True)
5254
if not isinstance(strict, bool):
5355
raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}")
5456

55-
with Codex(base_url=base_url, _strict_response_validation=strict) as client:
57+
with Codex(base_url=base_url, auth_token=auth_token, _strict_response_validation=strict) as client:
5658
yield client
5759

5860

@@ -76,5 +78,7 @@ async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncCodex]:
7678
else:
7779
raise TypeError(f"Unexpected fixture parameter type {type(param)}, expected bool or dict")
7880

79-
async with AsyncCodex(base_url=base_url, _strict_response_validation=strict, http_client=http_client) as client:
81+
async with AsyncCodex(
82+
base_url=base_url, auth_token=auth_token, _strict_response_validation=strict, http_client=http_client
83+
) as client:
8084
yield client

0 commit comments

Comments
 (0)