File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
services/web/server/tests/unit/with_dbs/01 Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1515from models_library .products import ProductName
1616from pytest_mock import MockerFixture
1717from pytest_simcore .helpers .assert_checks import assert_status
18+ from pytest_simcore .helpers .monkeypatch_envs import setenvs_from_dict
1819from pytest_simcore .helpers .typing_env import EnvVarsDict
1920from pytest_simcore .helpers .webserver_login import NewUser , UserInfoDict
2021from servicelib .aiohttp import status
@@ -226,11 +227,12 @@ async def app_environment(
226227 app_environment : EnvVarsDict ,
227228 monkeypatch : pytest .MonkeyPatch ,
228229) -> EnvVarsDict :
229- webserver_garbage_collector = '{"GARBAGE_COLLECTOR_INTERVAL_S": 30, "GARBAGE_COLLECTOR_PRUNE_APIKEYS_INTERVAL_S": 1}'
230- monkeypatch .setenv ("WEBSERVER_GARBAGE_COLLECTOR" , webserver_garbage_collector )
231- return app_environment | {
232- "WEBSERVER_GARBAGE_COLLECTOR" : webserver_garbage_collector
233- }
230+ return app_environment | setenvs_from_dict (
231+ monkeypatch ,
232+ {
233+ "WEBSERVER_GARBAGE_COLLECTOR" : '{"GARBAGE_COLLECTOR_INTERVAL_S": 30, "GARBAGE_COLLECTOR_PRUNE_APIKEYS_INTERVAL_S": 1}'
234+ },
235+ )
234236
235237
236238async def test_prune_expired_api_keys_task_is_triggered (
You can’t perform that action at this time.
0 commit comments