Skip to content

Commit 7afb97b

Browse files
committed
Merge branch 'develop' into dedl
2 parents 9dd65c8 + 5ebb90b commit 7afb97b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/units/test_http_server.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,25 @@ def setUpClass(cls):
4949

5050
cls.tested_product_type = "S2_MSI_L1C"
5151

52-
# load fake credentials to prevent providers needing auth for search to be pruned
53-
os.environ["EODAG_CFG_FILE"] = os.path.join(
54-
TEST_RESOURCES_PATH, "wrong_credentials_conf.yml"
55-
)
56-
5752
# Mock home and eodag conf directory to tmp dir
5853
cls.tmp_home_dir = TemporaryDirectory()
5954
cls.expanduser_mock = mock.patch(
6055
"os.path.expanduser", autospec=True, return_value=cls.tmp_home_dir.name
6156
)
6257
cls.expanduser_mock.start()
6358

59+
# mock os.environ to empty env
60+
cls.mock_os_environ = mock.patch.dict(os.environ, {}, clear=True)
61+
cls.mock_os_environ.start()
62+
63+
# disable product types fetch
64+
os.environ["EODAG_EXT_PRODUCT_TYPES_CFG_FILE"] = ""
65+
66+
# load fake credentials to prevent providers needing auth for search to be pruned
67+
os.environ["EODAG_CFG_FILE"] = os.path.join(
68+
TEST_RESOURCES_PATH, "wrong_credentials_conf.yml"
69+
)
70+
6471
# import after having mocked home_dir because it launches http server (and EODataAccessGateway)
6572
# reload eodag.rest.utils to prevent eodag_api cache conflicts
6673
import eodag.rest.utils
@@ -70,13 +77,6 @@ def setUpClass(cls):
7077

7178
cls.eodag_http_server = eodag_http_server
7279

73-
# mock os.environ to empty env
74-
cls.mock_os_environ = mock.patch.dict(os.environ, {}, clear=True)
75-
cls.mock_os_environ.start()
76-
77-
# disable product types fetch
78-
os.environ["EODAG_EXT_PRODUCT_TYPES_CFG_FILE"] = ""
79-
8080
@classmethod
8181
def tearDownClass(cls):
8282
super(RequestTestCase, cls).tearDownClass()

0 commit comments

Comments
 (0)