From 8b0ab271e459a53c72307c961416a62f2a9de501 Mon Sep 17 00:00:00 2001
From: lb584 <lb584@cam.ac.uk>
Date: Tue, 14 Mar 2023 16:54:12 +0000
Subject: [PATCH] making full integration tests use the same test suite as
 half-fat ones (work ongoing)

---
 conda-env-py3EWS-nobuilds.yml                 |   1 +
 conda-env-py3EWS-withbuilds.yml               |   1 +
 .../integration/full/full_test_deposition.py  | 103 ++++++------------
 tests/integration/full/full_test_env_suit.py  |   4 +-
 tests/integration/full/full_test_survey.py    |   4 +-
 .../partial/integration_test_utils.py         |  17 +--
 tests/integration/partial/test_advisory.py    |   2 +-
 tests/integration/partial/test_deposition.py  |  92 +++++-----------
 tests/integration/partial/test_env_suit.py    |   2 +-
 tests/integration/partial/test_epi.py         |   2 +-
 tests/integration/partial/test_survey.py      |   2 +-
 .../configs/config_EastAfrica_fc_live.json    |   2 +-
 12 files changed, 84 insertions(+), 148 deletions(-)

diff --git a/conda-env-py3EWS-nobuilds.yml b/conda-env-py3EWS-nobuilds.yml
index f327285..e17e6e1 100644
--- a/conda-env-py3EWS-nobuilds.yml
+++ b/conda-env-py3EWS-nobuilds.yml
@@ -185,4 +185,5 @@ dependencies:
   - pip:
       - coverage==6.5.0
       - html-testrunner==1.2.1
+      - testresources==2.0.1
 prefix: /storage/app/EWS/envs/conda/py3EWS
diff --git a/conda-env-py3EWS-withbuilds.yml b/conda-env-py3EWS-withbuilds.yml
index 2eb778b..f682bd2 100644
--- a/conda-env-py3EWS-withbuilds.yml
+++ b/conda-env-py3EWS-withbuilds.yml
@@ -185,4 +185,5 @@ dependencies:
   - pip:
       - coverage==6.5.0
       - html-testrunner==1.2.1
+      - testresources==2.0.1
 prefix: /storage/app/EWS/envs/conda/py3EWS
diff --git a/tests/integration/full/full_test_deposition.py b/tests/integration/full/full_test_deposition.py
index b9c20ba..33f942a 100644
--- a/tests/integration/full/full_test_deposition.py
+++ b/tests/integration/full/full_test_deposition.py
@@ -1,96 +1,62 @@
 import argparse
 import copy
-import glob
 import os
 import sys
 import unittest
 
 from integration.partial.integration_test_utils import IntegrationTestUtils
+from integration.test_suites.depo_test_suite import BaseDepoTestSuite
 
 
-class FullTestDeposition(unittest.TestCase):
+class FullTestDeposition(BaseDepoTestSuite.DepoTestSuite):
 
-    TEST_OUT_PATH: str = "NOT_SET"
-    TEST_START_DATE: str = 'NOT_SET'
-    TEST_JOB_DIR: str = "NOT_SET"
+    def set_expected_values(self,
+                            ea_csv_count: int = 9,
+                            eth_csv_count: int = 9,
+                            ea_png_count: int = 3,
+                            eth_png_count: int = 3):
 
+        self.EA_CSV_COUNT = ea_csv_count
+        self.ETH_CSV_COUNT = eth_csv_count
+        self.EA_PNG_COUNT = ea_png_count
+        self.ETH_PNG_COUNT = eth_png_count
 
-    @classmethod
-    def setUpClass(cls) -> None:
-        FullTestDeposition.write_temp_run_config_file()
-        FullTestDeposition.run_depo_pipeline()
-        pass
+
+    def setUp(self) -> None:
+
+        self.set_expected_values()
+
+        if BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH is None \
+                or not os.path.isdir(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH):
+            FullTestDeposition.write_temp_run_config_file()
+            FullTestDeposition.run_depo_pipeline()
+        else:
+            print(f"output in {BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH} already written, skipping rerun")
 
 
     @staticmethod
     def write_temp_run_config_file():
+
         default_config = IntegrationTestUtils.DEFAULT_CONFIG_FILE_PATH
         default_config_dict: dict = IntegrationTestUtils.load_json_file(default_config)
         run_dict: dict = copy.deepcopy(default_config_dict)
-        run_dict['WorkspacePathout'] = FullTestDeposition.TEST_OUT_PATH
-        run_dict['WorkspacePath'] = FullTestDeposition.TEST_OUT_PATH
+        # BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH = IntegrationTestUtils.TEST_WORKSPACE_PATH + prefix + os.sep
+        run_dict['WorkspacePathout'] = BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH
+        run_dict['WorkspacePath'] = BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH
 
-        IntegrationTestUtils.TEMP_CONFIG_FILE_PATH = FullTestDeposition.TEST_OUT_PATH + "temp_config.json"
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        os.makedirs(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH)
+        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH + "temp_config.json"
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
 
     @staticmethod
     def run_depo_pipeline():
         component = 'Deposition'
         IntegrationTestUtils.run_external_pipeline(component,
-                                                   FullTestDeposition.TEST_START_DATE,
+                                                   BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE,
                                                    IntegrationTestUtils.EMAIL_CRED_PATH)
 
 
-    def test_standard_run_input_status_success(self):
-        status_file_path = os.path.join(FullTestDeposition.TEST_OUT_PATH, FullTestDeposition.TEST_JOB_DIR, "STATUS_SUCCESS")
-        success_file_exists: bool = os.path.isfile(status_file_path)
-        self.assertTrue(success_file_exists)
-
-
-    def test_standard_run_input_all_regions_ran(self):
-        """
-        working on the assumption that if there are images for each region, it must have run through
-        (at least past the region iteration)
-        """
-
-        east_africa_image_path = os.path.join(FullTestDeposition.TEST_OUT_PATH, FullTestDeposition.TEST_JOB_DIR,
-                                              "plotting", "eastafrica", "images", "Weekly",
-                                              "deposition_eastafrica_leaf_rust_total_*_map.png")
-        ethiopia_image_path = os.path.join(FullTestDeposition.TEST_OUT_PATH, FullTestDeposition.TEST_JOB_DIR,
-                                           "plotting", "ethiopia", "images", "Weekly",
-                                           "deposition_ethiopia_leaf_rust_total_*_map.png")
-
-        ea_file_exists: bool = len(glob.glob(east_africa_image_path)) > 0
-        eth_file_exists: bool = len(glob.glob(ethiopia_image_path)) > 0
-        self.assertTrue(ea_file_exists)
-        self.assertTrue(eth_file_exists)
-
-
-    def test_standard_run_all_input_csvs_produced(self):
-        east_africa_csv_path = os.path.join(FullTestDeposition.TEST_OUT_PATH, FullTestDeposition.TEST_JOB_DIR,
-                                            "plotting", "eastafrica", "input_csvs", "*.csv")
-        ethiopia_csv_path = os.path.join(FullTestDeposition.TEST_OUT_PATH, FullTestDeposition.TEST_JOB_DIR,
-                                         "plotting", "ethiopia", "input_csvs", "*.csv")
-
-        ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_csv_path)
-        eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_csv_path)
-        self.assertEqual(9, ea_csv_count)
-        self.assertEqual(9, eth_csv_count)
-
-
-    def test_standard_run_all_images_produced(self):
-        east_africa_image_path = os.path.join(FullTestDeposition.TEST_OUT_PATH, FullTestDeposition.TEST_JOB_DIR,
-                                              "plotting", "eastafrica", "images", "Weekly", "*.png")
-        ethiopia_image_path = os.path.join(FullTestDeposition.TEST_OUT_PATH, FullTestDeposition.TEST_JOB_DIR,
-                                           "plotting", "ethiopia", "images", "Weekly", "*.png")
-
-        ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_image_path)
-        eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_image_path)
-        self.assertEqual(3, ea_csv_count)
-        self.assertEqual(3, eth_csv_count)
-
-
 if __name__ == '__main__':
     parser = argparse.ArgumentParser()
     parser.add_argument('--config', required = True)
@@ -109,12 +75,15 @@ if __name__ == '__main__':
 
     IntegrationTestUtils.DEFAULT_CONFIG_FILE_PATH = _config_file
 
-    FullTestDeposition.TEST_OUT_PATH = _outdir
+    nowstring: str = IntegrationTestUtils.get_now_string()
+    prefix: str = "temp_depo_" + nowstring
+    # prefix: str = "temp_depo"
+    BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH = _outdir + prefix + os.sep
     IntegrationTestUtils.EMAIL_CRED_PATH = _email_cred_path
 
-    FullTestDeposition.TEST_START_DATE = IntegrationTestUtils.generate_run_date(_run_date_type, _custom_run_date)
+    BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE = IntegrationTestUtils.generate_run_date(_run_date_type, _custom_run_date)
 
-    FullTestDeposition.TEST_JOB_DIR = "DEPOSITION_" + FullTestDeposition.TEST_START_DATE
+    BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR = "DEPOSITION_" + BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE
 
     #  Now set the sys.argv to the unittest_args (leaving sys.argv[0] alone)
     sys.argv[1:] = _args.unittest_args
diff --git a/tests/integration/full/full_test_env_suit.py b/tests/integration/full/full_test_env_suit.py
index 3b58280..9bee815 100644
--- a/tests/integration/full/full_test_env_suit.py
+++ b/tests/integration/full/full_test_env_suit.py
@@ -36,8 +36,8 @@ class FullTestEnvSuit(unittest.TestCase):
         run_dict['Environment']['INPUT_PATH'] = FullTestEnvSuit.TEST_OUT_PATH
         run_dict['Environment']['OUTPUT_PATH'] = FullTestEnvSuit.TEST_OUT_PATH
 
-        IntegrationTestUtils.TEMP_CONFIG_FILE_PATH = FullTestEnvSuit.TEST_OUT_PATH + "temp_config.json"
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = FullTestEnvSuit.TEST_OUT_PATH + "temp_config.json"
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
 
     @staticmethod
diff --git a/tests/integration/full/full_test_survey.py b/tests/integration/full/full_test_survey.py
index a90ad1b..887b821 100644
--- a/tests/integration/full/full_test_survey.py
+++ b/tests/integration/full/full_test_survey.py
@@ -30,8 +30,8 @@ class FullTestSurvey(unittest.TestCase):
         run_dict['Survey']['SkipServerDownload'] = False
         # run_dict['ServerName'] = ''  # nothing, as local machine
 
-        IntegrationTestUtils.TEMP_CONFIG_FILE_PATH = FullTestSurvey.TEST_OUT_PATH + "temp_config.json"
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = FullTestSurvey.TEST_OUT_PATH + "temp_config.json"
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
     # @staticmethod
     # def unpack_dependencies():
diff --git a/tests/integration/partial/integration_test_utils.py b/tests/integration/partial/integration_test_utils.py
index 1b8ee79..1bde5ac 100644
--- a/tests/integration/partial/integration_test_utils.py
+++ b/tests/integration/partial/integration_test_utils.py
@@ -11,10 +11,13 @@ class IntegrationTestUtils:
 
     EMAIL_CRED_PATH: str = "../../test_data/test_deployment/envs/Cred_gmail.json"
     DEFAULT_CONFIG_FILE_PATH: str = "../../test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json"
-    TEMP_CONFIG_FILE_PATH: str = "../../test_data/test_deployment/regions/EastAfrica/workspace/temp_config.json"
-    EXAMPLE_SURVEY_FILE_PATH: str = "../../test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/example_survey_run.zip"
-    EXAMPLE_DEPO_FILE_PATH: str = "../../test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/example_depo_run.zip"
-    EXAMPLE_ENV_SUIT_FILE_PATH: str = "../../test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/example_env_suit_run.zip"
+    TEST_WORKSPACE_PATH: str = "../../test_data/test_deployment/regions/EastAfrica/workspace/"
+    TEMP_CONFIG_FILE_NAME: str = "temp_config.json"
+
+    TEST_ASSETS_PATH: str = "../../test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/"
+    EXAMPLE_SURVEY_FILE_PATH: str = TEST_ASSETS_PATH + "example_survey_run.zip"
+    EXAMPLE_DEPO_FILE_PATH: str = TEST_ASSETS_PATH + "example_depo_run.zip"
+    EXAMPLE_ENV_SUIT_FILE_PATH: str = TEST_ASSETS_PATH + "example_env_suit_run.zip"
 
     @staticmethod
     def load_json_file(file: str) -> dict:
@@ -31,7 +34,7 @@ class IntegrationTestUtils:
 
     @staticmethod
     def get_now_string() -> str:
-        nowstring: str = datetime.date.today().strftime('%Y-%m-%d_%H%M%S')
+        nowstring: str = datetime.datetime.today().strftime('%Y-%m-%d_%H%M%S')
         return nowstring
 
 
@@ -93,7 +96,7 @@ class IntegrationTestUtils:
         args_dict['noupload'] = True
         args_dict['start_date'] = start_date
         args_dict['component'] = component
-        args_dict['config_paths'] = [IntegrationTestUtils.TEMP_CONFIG_FILE_PATH]
+        args_dict['config_paths'] = [IntegrationTestUtils.TEMP_CONFIG_FILE_NAME]
         args_dict['log_level'] = 'info'
         args_dict['clearup'] = False
 
@@ -126,7 +129,7 @@ class IntegrationTestUtils:
         args_dict['noupload'] = True  # need to work out where to upload the results too when a test
         args_dict['start_date'] = start_date
         args_dict['component'] = component
-        args_dict['config_paths'] = [IntegrationTestUtils.TEMP_CONFIG_FILE_PATH]
+        args_dict['config_paths'] = [IntegrationTestUtils.TEMP_CONFIG_FILE_NAME]
         args_dict['log_level'] = 'info'
         args_dict['clearup'] = False  # what is this
 
diff --git a/tests/integration/partial/test_advisory.py b/tests/integration/partial/test_advisory.py
index 6575702..807d6c1 100644
--- a/tests/integration/partial/test_advisory.py
+++ b/tests/integration/partial/test_advisory.py
@@ -33,7 +33,7 @@ class TestAdvisory(unittest.TestCase):
         run_dict['WorkspacePath'] = TestAdvisory.TEST_OUT_PATH
         run_dict['ServerName'] = ''  # nothing, as local machine
 
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
 
     @staticmethod
diff --git a/tests/integration/partial/test_deposition.py b/tests/integration/partial/test_deposition.py
index 9652cb7..a11d91f 100644
--- a/tests/integration/partial/test_deposition.py
+++ b/tests/integration/partial/test_deposition.py
@@ -3,93 +3,55 @@ import os
 import unittest
 
 from integration.partial.integration_test_utils import IntegrationTestUtils
+from integration.test_suites.depo_test_suite import BaseDepoTestSuite
 
 
-class TestDeposition(unittest.TestCase):
-    TEST_OUT_PATH: str = "not_set"
-    TEST_START_DATE: str = '20221001'
-    TEST_JOB_DIR: str = "DEPOSITION_" + TEST_START_DATE
+class TestDeposition(BaseDepoTestSuite.DepoTestSuite):
 
+    def set_expected_values(self):
+        self.EA_CSV_COUNT = 9
+        self.ETH_CSV_COUNT = 27
+        self.EA_PNG_COUNT = 3
+        self.ETH_PNG_COUNT = 6
 
-    @classmethod
-    def setUpClass(cls) -> None:
-        TestDeposition.write_temp_run_config_file()
-        TestDeposition.run_depo_pipeline()
+    def setUp(self) -> None:
+
+        self.set_expected_values()
+
+        if BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH is None or not os.path.isdir(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH):
+            TestDeposition.write_temp_run_config_file()
+            TestDeposition.run_depo_pipeline()
+        else:
+            print(f"output in {BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH} already written, skipping rerun")
 
 
     @staticmethod
     def write_temp_run_config_file():
         nowstring: str = IntegrationTestUtils.get_now_string()
         prefix: str = "temp_depo_" + nowstring
-        # prefix: str = ""
+        # prefix: str = "temp_depo"
 
         default_config = IntegrationTestUtils.DEFAULT_CONFIG_FILE_PATH
         default_config_dict: dict = IntegrationTestUtils.load_json_file(default_config)
         run_dict: dict = copy.deepcopy(default_config_dict)
-        TestDeposition.TEST_OUT_PATH = run_dict['WorkspacePathout'] + prefix + os.sep
-        run_dict['WorkspacePathout'] = TestDeposition.TEST_OUT_PATH
-        run_dict['WorkspacePath'] = TestDeposition.TEST_OUT_PATH
+        BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH = IntegrationTestUtils.TEST_WORKSPACE_PATH + prefix + os.sep
+        run_dict['WorkspacePathout'] = BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH
+        run_dict['WorkspacePath'] = BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH
         run_dict['ServerName'] = ''  # nothing, as local machine
-        full_server_path = os.path.abspath(
-            "../../test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/")
+        full_server_path = os.path.abspath(IntegrationTestUtils.TEST_ASSETS_PATH)
         run_dict['Deposition']['ServerPathTemplate'] = full_server_path
 
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        # may be reusing a non-timestamped output file during development, so allow extant TEST_OUT_PATH
+        os.makedirs(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH, exist_ok = True)
+        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH + "temp_config.json"
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
+
 
 
     @staticmethod
     def run_depo_pipeline():
         component = 'Deposition'
-        IntegrationTestUtils.run_unittest_pipeline(component, TestDeposition.TEST_START_DATE)
-
-
-    def test_standard_run_input_status_success(self):
-        status_file_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR, "STATUS_SUCCESS")
-        success_file_exists: bool = os.path.isfile(status_file_path)
-        self.assertTrue(success_file_exists)
-
-
-    def test_standard_run_input_all_regions_ran(self):
-        """
-        working on the assumption that if there are images for each region, it must have run through
-        (at least past the region iteration)
-        """
-
-        east_africa_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR,
-                                              "plotting", "eastafrica", "images", "Weekly",
-                                              "deposition_eastafrica_leaf_rust_total_202210010000_202210080000_map.png")
-        ethiopia_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR,
-                                           "plotting", "ethiopia", "images", "Weekly",
-                                           "deposition_ethiopia_leaf_rust_total_202210010000_202210080000_map.png")
-
-        ea_file_exists: bool = os.path.isfile(east_africa_image_path)
-        eth_file_exists: bool = os.path.isfile(ethiopia_image_path)
-        self.assertTrue(ea_file_exists)
-        self.assertTrue(eth_file_exists)
-
-
-    def test_standard_run_all_input_csvs_produced(self):
-        east_africa_csv_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR,
-                                            "plotting", "eastafrica", "input_csvs", "*.csv")
-        ethiopia_csv_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR,
-                                         "plotting", "ethiopia", "input_csvs", "*.csv")
-
-        ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_csv_path)
-        eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_csv_path)
-        self.assertEqual(9, ea_csv_count)
-        self.assertEqual(27, eth_csv_count)
-
-
-    def test_standard_run_all_images_produced(self):
-        east_africa_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR,
-                                              "plotting", "eastafrica", "images", "Weekly", "*.png")
-        ethiopia_image_path = os.path.join(TestDeposition.TEST_OUT_PATH, TestDeposition.TEST_JOB_DIR,
-                                           "plotting", "ethiopia", "images", "Weekly", "*.png")
-
-        ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_image_path)
-        eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_image_path)
-        self.assertEqual(3, ea_csv_count)
-        self.assertEqual(6, eth_csv_count)
+        IntegrationTestUtils.run_unittest_pipeline(component, BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE)
 
 
 if __name__ == '__main__':
diff --git a/tests/integration/partial/test_env_suit.py b/tests/integration/partial/test_env_suit.py
index 05c1372..c414af6 100644
--- a/tests/integration/partial/test_env_suit.py
+++ b/tests/integration/partial/test_env_suit.py
@@ -37,7 +37,7 @@ class TestEnvSuit(unittest.TestCase):
             "../../test_data/test_deployment/regions/EastAfrica/resources/coordinator/assets/")
         run_dict['Environment']['ServerPathTemplate'] = full_server_path
 
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
 
     @staticmethod
diff --git a/tests/integration/partial/test_epi.py b/tests/integration/partial/test_epi.py
index 3f4f08c..2858e09 100644
--- a/tests/integration/partial/test_epi.py
+++ b/tests/integration/partial/test_epi.py
@@ -33,7 +33,7 @@ class TestEpi(unittest.TestCase):
         run_dict['WorkspacePath'] = TestEpi.TEST_OUT_PATH
         run_dict['ServerName'] = ''  # nothing, as local machine
 
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
 
     @staticmethod
diff --git a/tests/integration/partial/test_survey.py b/tests/integration/partial/test_survey.py
index 7b46223..704a5d6 100644
--- a/tests/integration/partial/test_survey.py
+++ b/tests/integration/partial/test_survey.py
@@ -33,7 +33,7 @@ class TestSurvey(unittest.TestCase):
         run_dict['Survey']['SkipServerDownload'] = True
         run_dict['ServerName'] = ''  # nothing, as local machine
 
-        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_PATH)
+        IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
     @staticmethod
     def unpack_dependencies():
diff --git a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json b/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
index 711a65e..3225c4d 100644
--- a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
+++ b/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
@@ -3,7 +3,7 @@
     "SubRegionNames" : ["EastAfrica","Ethiopia"],
     "StartTime" : "?",
     "StartString" : "?",
-    "WorkspacePathout" : "../../test_data/test_deployment/regions/EastAfrica/workspace/",
+    "WorkspacePathout" : "set_in_the_code",
     "WorkspacePath" : "set_in_the_code",
     "ResourcesPath" : "../../test_data/test_deployment/regions/EastAfrica/resources/",
     "ServerPath" : "OVERRIDDEN",
-- 
GitLab