@@ -49,18 +49,25 @@ def setUpClass(cls):
49
49
50
50
cls .tested_product_type = "S2_MSI_L1C"
51
51
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
-
57
52
# Mock home and eodag conf directory to tmp dir
58
53
cls .tmp_home_dir = TemporaryDirectory ()
59
54
cls .expanduser_mock = mock .patch (
60
55
"os.path.expanduser" , autospec = True , return_value = cls .tmp_home_dir .name
61
56
)
62
57
cls .expanduser_mock .start ()
63
58
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
+
64
71
# import after having mocked home_dir because it launches http server (and EODataAccessGateway)
65
72
# reload eodag.rest.utils to prevent eodag_api cache conflicts
66
73
import eodag .rest .utils
@@ -70,13 +77,6 @@ def setUpClass(cls):
70
77
71
78
cls .eodag_http_server = eodag_http_server
72
79
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
-
80
80
@classmethod
81
81
def tearDownClass (cls ):
82
82
super (RequestTestCase , cls ).tearDownClass ()
0 commit comments