File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1414import pytest
1515import requests
1616
17- from deepgram .client import DeepgramApi
17+ from deepgram .base_client import BaseClient
18+ from deepgram .environment import DeepgramClientEnvironment
1819
1920
2021def _compose_file () -> str :
@@ -87,7 +88,7 @@ def pytest_unconfigure(config: pytest.Config) -> None:
8788 _stop_wiremock ()
8889
8990
90- def get_client (test_id : str ) -> DeepgramApi :
91+ def get_client (test_id : str ) -> BaseClient :
9192 """
9293 Creates a configured client instance for wire tests.
9394
@@ -97,8 +98,14 @@ def get_client(test_id: str) -> DeepgramApi:
9798 Returns:
9899 A configured client instance with all required auth parameters.
99100 """
100- return DeepgramApi (
101- base_url = "http://localhost:8080" ,
101+ # Create a custom environment pointing to WireMock
102+ wiremock_environment = DeepgramClientEnvironment (
103+ base = "http://localhost:8080" ,
104+ production = "ws://localhost:8080" ,
105+ agent = "ws://localhost:8080" ,
106+ )
107+ return BaseClient (
108+ environment = wiremock_environment ,
102109 headers = {"X-Test-Id" : test_id },
103110 api_key = "test_api_key" ,
104111 )
You can’t perform that action at this time.
0 commit comments