File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
services/director-v2/tests Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -206,10 +206,14 @@ async def initialized_app(mock_env: EnvVarsDict) -> AsyncIterable[FastAPI]:
206206
207207
208208@pytest .fixture ()
209- async def client (initialized_app : FastAPI ) -> AsyncIterator [TestClient ]:
209+ async def client (mock_env : EnvVarsDict ) -> AsyncIterator [TestClient ]:
210210 # NOTE: this way we ensure the events are run in the application
211211 # since it starts the app on a test server
212- with TestClient (initialized_app , raise_server_exceptions = True ) as test_client :
212+ settings = AppSettings .create_from_envs ()
213+ app = init_app (settings )
214+ # NOTE: we cannot use the initialized_app fixture here as the TestClient also creates it
215+ print ("Application settings\n " , settings .model_dump_json (indent = 2 ))
216+ with TestClient (app , raise_server_exceptions = True ) as test_client :
213217 yield test_client
214218
215219
You can’t perform that action at this time.
0 commit comments