Skip to content

Commit b04258d

Browse files
committed
rm external_envfile_dict
1 parent a31f1de commit b04258d

File tree

4 files changed

+0
-90
lines changed

4 files changed

+0
-90
lines changed

services/api-server/tests/unit/test_core_settings.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,12 @@
33
# pylint: disable=redefined-outer-name
44

55

6-
import pytest
76
from pytest_simcore.helpers.monkeypatch_envs import (
87
EnvVarsDict,
9-
delenvs_from_dict,
10-
setenvs_from_dict,
118
)
129
from simcore_service_api_server.core.settings import ApplicationSettings
1310

1411

15-
@pytest.fixture
16-
def app_environment(
17-
monkeypatch: pytest.MonkeyPatch,
18-
app_environment: EnvVarsDict,
19-
external_envfile_dict: EnvVarsDict,
20-
) -> EnvVarsDict:
21-
"""OVERRIDES app_environment fixture:
22-
23-
Enables using external envfiles (e.g. repo.config files) to run tests against
24-
within this test module.
25-
"""
26-
if external_envfile_dict:
27-
delenvs_from_dict(monkeypatch, app_environment, raising=False)
28-
return setenvs_from_dict(
29-
monkeypatch,
30-
{**external_envfile_dict},
31-
)
32-
return app_environment
33-
34-
3512
def test_valid_application_settings(app_environment: EnvVarsDict):
3613
assert app_environment
3714

services/clusters-keeper/tests/unit/test_core_settings.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from pydantic import ValidationError
1212
from pytest_simcore.helpers.monkeypatch_envs import (
1313
EnvVarsDict,
14-
delenvs_from_dict,
1514
setenvs_from_dict,
1615
)
1716
from simcore_service_clusters_keeper.core.settings import ApplicationSettings
@@ -118,25 +117,10 @@ def test_valid_primary_custom_tags(
118117

119118
def test_valid_application_settings(
120119
monkeypatch: pytest.MonkeyPatch,
121-
external_envfile_dict: EnvVarsDict,
122120
app_environment: EnvVarsDict,
123121
):
124-
"""
125-
We validate actual envfiles (e.g. repo.config files) by passing them via the CLI
126-
127-
$ ln -s /path/to/osparc-config/deployments/mydeploy.com/repo.config .secrets
128-
$ pytest --external-envfile=.secrets --pdb tests/unit/test_core_settings.py
129-
130-
"""
131-
132122
# Mock
133123
assert app_environment
134-
if external_envfile_dict:
135-
delenvs_from_dict(monkeypatch, app_environment, raising=False)
136-
setenvs_from_dict(
137-
monkeypatch,
138-
{**external_envfile_dict},
139-
)
140124

141125
# Test
142126
settings = ApplicationSettings() # type: ignore

services/director/tests/unit/test_core_settings.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,13 @@
1616
import pytest
1717
from pydantic import ValidationError
1818
from pytest_simcore.helpers.monkeypatch_envs import (
19-
delenvs_from_dict,
2019
setenvs_from_dict,
2120
setenvs_from_envfile,
2221
)
2322
from pytest_simcore.helpers.typing_env import EnvVarsDict
2423
from simcore_service_director.core.settings import ApplicationSettings
2524

2625

27-
@pytest.fixture
28-
def app_environment(
29-
monkeypatch: pytest.MonkeyPatch,
30-
app_environment: EnvVarsDict,
31-
external_envfile_dict: EnvVarsDict,
32-
) -> EnvVarsDict:
33-
"""OVERRIDES app_environment fixture:
34-
35-
Enables using external envfiles (e.g. repo.config files) to run tests against
36-
within this test module.
37-
"""
38-
if external_envfile_dict:
39-
delenvs_from_dict(monkeypatch, app_environment, raising=False)
40-
return setenvs_from_dict(
41-
monkeypatch,
42-
{**external_envfile_dict},
43-
)
44-
return app_environment
45-
46-
4726
def test_valid_application_settings(app_environment: EnvVarsDict):
4827
settings = ApplicationSettings() # type: ignore
4928
assert settings

services/dynamic-scheduler/tests/unit/test_core_settings.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,14 @@
11
# pylint: disable=unused-variable
22
# pylint: disable=unused-argument
33
# pylint: disable=redefined-outer-name
4-
"""
5-
We validate actual envfiles (e.g. repo.config files) by passing them via the CLI
64

7-
$ ln -s /path/to/osparc-config/deployments/mydeploy.com/repo.config .secrets
8-
$ pytest --external-envfile=.secrets --pdb tests/unit/test_core_settings.py
95

10-
"""
11-
12-
13-
import pytest
146
from pytest_simcore.helpers.monkeypatch_envs import (
157
EnvVarsDict,
16-
delenvs_from_dict,
17-
setenvs_from_dict,
188
)
199
from simcore_service_dynamic_scheduler.core.settings import ApplicationSettings
2010

2111

22-
@pytest.fixture
23-
def app_environment(
24-
monkeypatch: pytest.MonkeyPatch,
25-
app_environment: EnvVarsDict,
26-
external_envfile_dict: EnvVarsDict,
27-
) -> EnvVarsDict:
28-
"""OVERRIDES app_environment fixture:
29-
30-
Enables using external envfiles (e.g. repo.config files) to run tests against
31-
within this test module.
32-
"""
33-
if external_envfile_dict:
34-
delenvs_from_dict(monkeypatch, app_environment, raising=False)
35-
return setenvs_from_dict(
36-
monkeypatch,
37-
{**external_envfile_dict},
38-
)
39-
return app_environment
40-
41-
4212
def test_valid_application_settings(app_environment: EnvVarsDict):
4313
assert app_environment
4414

0 commit comments

Comments
 (0)