diff --git a/tests/integration/integration_test_utils.py b/tests/integration/integration_test_utils.py index b4f228a3e6f9f417a3341539cd587d3fb8984ec6..c7a5c0ddbfcb70698821250a87c6d97537d183ce 100644 --- a/tests/integration/integration_test_utils.py +++ b/tests/integration/integration_test_utils.py @@ -4,6 +4,8 @@ from datetime import datetime class IntegrationTestUtils: + TEMP_CONFIG_FILE_PATH: str = "../test_data/test_deployment/regions/EastAfrica/workspace/temp_config.json" + @staticmethod def load_json_file(file: str) -> dict: with open(file) as config_file: diff --git a/tests/integration/test_deposition.py b/tests/integration/test_deposition.py index cfa60697c42adacc4a824459e1578bd27850de15..f64dae77cf92fc9638ce9a3bc223d4f34c97b8cf 100644 --- a/tests/integration/test_deposition.py +++ b/tests/integration/test_deposition.py @@ -7,8 +7,6 @@ from integration.integration_test_utils import IntegrationTestUtils class TestDeposition(unittest.TestCase): - TEMP_CONFIG_FILE_PATH: str = "../test_data/test_deployment/regions/EastAfrica/workspace/temp_config.json" - def setUp(self) -> None: super().setUp() default_config = '../test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json' @@ -23,7 +21,7 @@ class TestDeposition(unittest.TestCase): from Processor import run_Process, set_log_level args_dict: dict = {} args_dict['component'] = 'Deposition' - args_dict['config_paths'] = [TestDeposition.TEMP_CONFIG_FILE_PATH] + args_dict['config_paths'] = [IntegrationTestUtils.TEMP_CONFIG_FILE_PATH] args_dict['log_level'] = 'error' args_dict['live'] = False args_dict['start_date'] = '20221001' @@ -40,7 +38,7 @@ class TestDeposition(unittest.TestCase): run_dict['SubRegionNames'].remove('Kenya') run_dict['Deposition']['EWS-Plotting'].pop('Kenya', None) - IntegrationTestUtils.write_json_file(run_dict, self.TEMP_CONFIG_FILE_PATH) + IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH) run_Process(args_dict) self.assertTrue(True) diff --git a/tests/integration/test_env_suit.py b/tests/integration/test_env_suit.py index f2c45b1521447d2cd7de6db908249c6230c26438..3366cabd876e7bda4928d1d88ca60980e1280f4c 100644 --- a/tests/integration/test_env_suit.py +++ b/tests/integration/test_env_suit.py @@ -3,7 +3,6 @@ import os import unittest from integration.integration_test_utils import IntegrationTestUtils -from integration.test_deposition import TestDeposition class TestEnvSuit(unittest.TestCase): @@ -21,7 +20,7 @@ class TestEnvSuit(unittest.TestCase): from Processor import run_Process, set_log_level args_dict: dict = {} args_dict['component'] = 'Environment' - args_dict['config_paths'] = [TestDeposition.TEMP_CONFIG_FILE_PATH] + args_dict['config_paths'] = [IntegrationTestUtils.TEMP_CONFIG_FILE_PATH] args_dict['log_level'] = 'error' args_dict['live'] = False args_dict['start_date'] = '20221001' @@ -41,7 +40,7 @@ class TestEnvSuit(unittest.TestCase): run_dict['SubRegionNames'].remove('Kenya') - IntegrationTestUtils.write_json_file(run_dict, TestDeposition.TEMP_CONFIG_FILE_PATH) + IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH) run_Process(args_dict) self.assertTrue(True)