aboutsummaryrefslogtreecommitdiffstats
path: root/app/test/fetch/api_fetch/test_api_fetch_ports.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/test/fetch/api_fetch/test_api_fetch_ports.py')
-rw-r--r--app/test/fetch/api_fetch/test_api_fetch_ports.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/test/fetch/api_fetch/test_api_fetch_ports.py b/app/test/fetch/api_fetch/test_api_fetch_ports.py
index ad79757..355532d 100644
--- a/app/test/fetch/api_fetch/test_api_fetch_ports.py
+++ b/app/test/fetch/api_fetch/test_api_fetch_ports.py
@@ -17,8 +17,12 @@ from unittest.mock import MagicMock
class TestApiFetchPorts(TestFetch):
def setUp(self):
+ super().setUp()
self.configure_environment()
+
+ self._v2_auth_pwd = ApiFetchPorts.v2_auth_pwd
ApiFetchPorts.v2_auth_pwd = MagicMock(return_value=TOKEN)
+
self.fetcher = ApiFetchPorts()
self.set_regions_for_fetcher(self.fetcher)
@@ -87,3 +91,8 @@ class TestApiFetchPorts(TestFetch):
result = self.fetcher.get(REGION_NAME)
self.fetcher.v2_auth_pwd = MagicMock(return_value=TOKEN)
self.assertEqual(result, [], "Can't get [] when the token is invalid")
+
+ def tearDown(self):
+ super().tearDown()
+ ApiFetchPorts.v2_auth_pwd = self._v2_auth_pwd
+ self.reset_regions_for_fetcher(self.fetcher)