aboutsummaryrefslogtreecommitdiffstats
path: root/app/test/fetch/api_fetch/test_api_fetch_project_hosts.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/test/fetch/api_fetch/test_api_fetch_project_hosts.py')
-rw-r--r--app/test/fetch/api_fetch/test_api_fetch_project_hosts.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/test/fetch/api_fetch/test_api_fetch_project_hosts.py b/app/test/fetch/api_fetch/test_api_fetch_project_hosts.py
index 7cedf67..da3df17 100644
--- a/app/test/fetch/api_fetch/test_api_fetch_project_hosts.py
+++ b/app/test/fetch/api_fetch/test_api_fetch_project_hosts.py
@@ -18,8 +18,12 @@ from test.fetch.api_fetch.test_data.regions import REGIONS
class TestApiFetchProjectHosts(TestFetch):
def setUp(self):
+ super().setUp()
self.configure_environment()
+
+ self._v2_auth_pwd = ApiFetchProjectHosts.v2_auth_pwd
ApiFetchProjectHosts.v2_auth_pwd = MagicMock(return_value=TOKEN)
+
self.fetcher = ApiFetchProjectHosts()
self.set_regions_for_fetcher(self.fetcher)
self.region = REGIONS[REGION_NAME]
@@ -135,3 +139,8 @@ class TestApiFetchProjectHosts(TestFetch):
self.fetcher.v2_auth_pwd = MagicMock(return_value=[])
result = self.fetcher.get(PROJECT_NAME)
self.assertEqual(result, [], "Can't get [] when the token is invalid")
+
+ def tearDown(self):
+ super().tearDown()
+ ApiFetchProjectHosts.v2_auth_pwd = self._v2_auth_pwd
+ self.reset_regions_for_fetcher(self.fetcher)