From 9f7ee80249a3beff7c9b70d41f60403960f34be6 Mon Sep 17 00:00:00 2001
From: lb584 <lb584@cam.ac.uk>
Date: Fri, 14 Apr 2023 16:57:13 +0100
Subject: [PATCH] modifying tests to shar emore code

---
 .../integration/full/full_test_deposition.py  | 55 ++++---------------
 .../partial/integration_test_utils.py         | 45 +++++++++++++++
 tests/integration/partial/test_deposition.py  | 21 ++++---
 tests/integration/partial/test_env_suit.py    | 28 +++++-----
 .../test_suites/depo_test_suite.py            | 33 +++++------
 .../test_suites/env_suit_test_suite.py        | 33 +++++------
 6 files changed, 107 insertions(+), 108 deletions(-)

diff --git a/tests/integration/full/full_test_deposition.py b/tests/integration/full/full_test_deposition.py
index b3092a9..953516d 100644
--- a/tests/integration/full/full_test_deposition.py
+++ b/tests/integration/full/full_test_deposition.py
@@ -1,9 +1,5 @@
 import copy
 import os
-import sys
-from unittest import TestLoader, TestSuite
-
-from HtmlTestRunner import HTMLTestRunner
 
 from integration.partial.integration_test_utils import IntegrationTestUtils
 from integration.test_suites.depo_test_suite import BaseDepoTestSuite
@@ -22,12 +18,12 @@ class FullTestDeposition(BaseDepoTestSuite.DepoTestSuite):
 
         self.set_expected_values()
 
-        if BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH is None \
-                or not os.path.isdir(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH):
+        if IntegrationTestUtils.TEST_OUT_PATH is None \
+                or not os.path.isdir(IntegrationTestUtils.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")
+            print(f"output in {IntegrationTestUtils.TEST_OUT_PATH} already written, skipping rerun")
 
 
     @staticmethod
@@ -37,11 +33,11 @@ class FullTestDeposition(BaseDepoTestSuite.DepoTestSuite):
         default_config_dict: dict = IntegrationTestUtils.load_json_file(default_config)
         run_dict: dict = copy.deepcopy(default_config_dict)
         # 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['WorkspacePathout'] = IntegrationTestUtils.TEST_OUT_PATH
+        run_dict['WorkspacePath'] = IntegrationTestUtils.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"
+        os.makedirs(IntegrationTestUtils.TEST_OUT_PATH, exist_ok = True)
+        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = IntegrationTestUtils.TEST_OUT_PATH + "temp_config.json"
         IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
 
@@ -49,41 +45,10 @@ class FullTestDeposition(BaseDepoTestSuite.DepoTestSuite):
     def run_depo_pipeline():
         component = 'Deposition'
         IntegrationTestUtils.run_external_pipeline(component,
-                                                   BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE,
+                                                   IntegrationTestUtils.TEST_START_DATE,
                                                    IntegrationTestUtils.EMAIL_CRED_PATH)
 
 
 if __name__ == '__main__':
-
-    _parser = IntegrationTestUtils.build_arg_parser()
-
-    _args = _parser.parse_args()
-    _config_file: str = _args.config
-    _outdir: str = _args.outdir
-    _email_cred_path: str = _args.email_cred
-    _test_report_dir: str = _args.test_report_dir
-    _run_date_type: str = _args.run_date_type
-    _custom_run_date: str = _args.custom_run_date
-
-    IntegrationTestUtils.DEFAULT_CONFIG_FILE_PATH = _config_file
-
-    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
-
-    BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE = IntegrationTestUtils.generate_run_date(_run_date_type, _custom_run_date)
-
-    BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                                                "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
-    tests: TestSuite = TestLoader().loadTestsFromTestCase(FullTestDeposition)
-
-    if _test_report_dir is None:
-        _test_report_dir = BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR
-
-    runner = HTMLTestRunner(output=_test_report_dir, combine_reports = True)
-    runner.run(tests)
+    # note the job prefix needs to match
+    IntegrationTestUtils.rune(FullTestDeposition, "DEPOSITION")
diff --git a/tests/integration/partial/integration_test_utils.py b/tests/integration/partial/integration_test_utils.py
index 339148f..53c7477 100644
--- a/tests/integration/partial/integration_test_utils.py
+++ b/tests/integration/partial/integration_test_utils.py
@@ -3,10 +3,14 @@ import datetime
 import glob
 import json
 import os
+import sys
 from importlib import reload
 from typing import List
+from unittest import TestSuite, TestLoader, TestCase
 from zipfile import ZipFile
 
+from HtmlTestRunner import HTMLTestRunner
+
 
 class IntegrationTestUtils:
 
@@ -20,6 +24,10 @@ class IntegrationTestUtils:
     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"
 
+    TEST_OUT_PATH: str = None
+    TEST_START_DATE: str = None
+    TEST_JOB_DIR: str = None
+
     @staticmethod
     def build_arg_parser() -> argparse.ArgumentParser:
         parser = argparse.ArgumentParser()
@@ -32,6 +40,43 @@ class IntegrationTestUtils:
         parser.add_argument('unittest_args', nargs='*')
         return parser
 
+    @staticmethod
+    def rune(test_case: [TestCase], job_prefix: str):
+        _parser = IntegrationTestUtils.build_arg_parser()
+
+        _args = _parser.parse_args()
+        _config_file: str = _args.config
+        _outdir: str = _args.outdir
+        _email_cred_path: str = _args.email_cred
+        _test_report_dir: str = _args.test_report_dir
+        _run_date_type: str = _args.run_date_type
+        _custom_run_date: str = _args.custom_run_date
+
+        IntegrationTestUtils.DEFAULT_CONFIG_FILE_PATH = _config_file
+
+        nowstring: str = IntegrationTestUtils.get_now_string()
+        prefix: str = f"temp_{job_prefix}_" + nowstring
+        # prefix: str = f"temp_{job_prefix}"
+        IntegrationTestUtils.TEST_OUT_PATH = _outdir + prefix + os.sep
+        IntegrationTestUtils.EMAIL_CRED_PATH = _email_cred_path
+
+        IntegrationTestUtils.TEST_START_DATE = IntegrationTestUtils.generate_run_date(_run_date_type,
+                                                                                      _custom_run_date)
+
+        IntegrationTestUtils.TEST_JOB_DIR = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                                         f"{job_prefix}_" +
+                                                         IntegrationTestUtils.TEST_START_DATE)
+
+        #  Now set the sys.argv to the unittest_args (leaving sys.argv[0] alone)
+        sys.argv[1:] = _args.unittest_args
+        tests: TestSuite = TestLoader().loadTestsFromTestCase(test_case)
+
+        if _test_report_dir is None:
+            _test_report_dir = IntegrationTestUtils.TEST_JOB_DIR
+
+        runner = HTMLTestRunner(output = _test_report_dir, combine_reports = True)
+        runner.run(tests)
+
     @staticmethod
     def load_json_file(file: str) -> dict:
         with open(file) as config_file:
diff --git a/tests/integration/partial/test_deposition.py b/tests/integration/partial/test_deposition.py
index 9b2866b..aff5001 100644
--- a/tests/integration/partial/test_deposition.py
+++ b/tests/integration/partial/test_deposition.py
@@ -10,8 +10,8 @@ class TestDeposition(BaseDepoTestSuite.DepoTestSuite):
 
     def set_expected_values(self):
 
-        BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE = "20221001"
-        BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR = "DEPOSITION_" + self.TEST_START_DATE
+        IntegrationTestUtils.TEST_START_DATE = "20221001"
+        IntegrationTestUtils.TEST_JOB_DIR = "DEPOSITION_" + IntegrationTestUtils.TEST_START_DATE
 
         self.EA_CSV_COUNT = 9
         self.ETH_CSV_COUNT = 27
@@ -22,11 +22,11 @@ class TestDeposition(BaseDepoTestSuite.DepoTestSuite):
 
         self.set_expected_values()
 
-        if BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH is None or not os.path.isdir(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH):
+        if IntegrationTestUtils.TEST_OUT_PATH is None or not os.path.isdir(IntegrationTestUtils.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")
+            print(f"output in {IntegrationTestUtils.TEST_OUT_PATH} already written, skipping rerun")
 
 
     @staticmethod
@@ -38,24 +38,23 @@ class TestDeposition(BaseDepoTestSuite.DepoTestSuite):
         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)
-        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.TEST_OUT_PATH = IntegrationTestUtils.TEST_WORKSPACE_PATH + prefix + os.sep
+        run_dict['WorkspacePathout'] = IntegrationTestUtils.TEST_OUT_PATH
+        run_dict['WorkspacePath'] = IntegrationTestUtils.TEST_OUT_PATH
         run_dict['ServerName'] = ''  # nothing, as local machine
         full_server_path = os.path.abspath(IntegrationTestUtils.TEST_ASSETS_PATH)
         run_dict['Deposition']['ServerPathTemplate'] = full_server_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"
+        os.makedirs(IntegrationTestUtils.TEST_OUT_PATH, exist_ok = True)
+        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = IntegrationTestUtils.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, BaseDepoTestSuite.DepoTestSuite.TEST_START_DATE)
+        IntegrationTestUtils.run_unittest_pipeline(component, IntegrationTestUtils.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 d6d4ac3..01f7999 100644
--- a/tests/integration/partial/test_env_suit.py
+++ b/tests/integration/partial/test_env_suit.py
@@ -9,8 +9,8 @@ from integration.test_suites.env_suit_test_suite import BaseEnvSuitTestSuite
 class TestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite):
 
     def set_expected_values(self):
-        BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_START_DATE = "20221001"
-        BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR = "ENVIRONMENT_2.0_" + self.TEST_START_DATE
+        IntegrationTestUtils.TEST_START_DATE = "20221001"
+        IntegrationTestUtils.TEST_JOB_DIR = "ENVIRONMENT_2.0_" + IntegrationTestUtils.TEST_START_DATE
 
         self.EA_CSV_COUNT = 18
         self.ETH_CSV_COUNT = 18
@@ -21,12 +21,12 @@ class TestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite):
 
         self.set_expected_values()
 
-        if BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH is None or not os.path.isdir(
-                BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH):
+        if IntegrationTestUtils.TEST_OUT_PATH is None or not os.path.isdir(
+                IntegrationTestUtils.TEST_OUT_PATH):
             TestEnvSuit.write_temp_run_config_file()
             TestEnvSuit.run_env_pipeline()
         else:
-            print(f"output in {BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH} already written, skipping rerun")
+            print(f"output in {IntegrationTestUtils.TEST_OUT_PATH} already written, skipping rerun")
 
 
     @staticmethod
@@ -38,26 +38,26 @@ class TestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite):
         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)
-        BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH = IntegrationTestUtils.TEST_WORKSPACE_PATH + prefix + os.sep
-        run_dict['WorkspacePathout'] = BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH
-        run_dict['WorkspacePath'] = BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH
-        run_dict['Environment']['WORK_PATH'] = BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH
-        run_dict['Environment']['INPUT_PATH'] = BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH
-        run_dict['Environment']['OUTPUT_PATH'] = BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH
+        IntegrationTestUtils.TEST_OUT_PATH = IntegrationTestUtils.TEST_WORKSPACE_PATH + prefix + os.sep
+        run_dict['WorkspacePathout'] = IntegrationTestUtils.TEST_OUT_PATH
+        run_dict['WorkspacePath'] = IntegrationTestUtils.TEST_OUT_PATH
+        run_dict['Environment']['WORK_PATH'] = IntegrationTestUtils.TEST_OUT_PATH
+        run_dict['Environment']['INPUT_PATH'] = IntegrationTestUtils.TEST_OUT_PATH
+        run_dict['Environment']['OUTPUT_PATH'] = IntegrationTestUtils.TEST_OUT_PATH
         run_dict['ServerName'] = ''  # nothing, as local machine
         full_server_path = os.path.abspath(IntegrationTestUtils.TEST_ASSETS_PATH)
         run_dict['Environment']['ServerPathTemplate'] = full_server_path
 
         # may be reusing a non-timestamped output file during development, so allow extant TEST_OUT_PATH
-        os.makedirs(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH, exist_ok = True)
-        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH + "temp_config.json"
+        os.makedirs(IntegrationTestUtils.TEST_OUT_PATH, exist_ok = True)
+        IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = IntegrationTestUtils.TEST_OUT_PATH + "temp_config.json"
         IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME)
 
 
     @staticmethod
     def run_env_pipeline():
         component = 'Environment'
-        IntegrationTestUtils.run_unittest_pipeline(component, BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_START_DATE)
+        IntegrationTestUtils.run_unittest_pipeline(component, IntegrationTestUtils.TEST_START_DATE)
 
 
 if __name__ == '__main__':
diff --git a/tests/integration/test_suites/depo_test_suite.py b/tests/integration/test_suites/depo_test_suite.py
index d952ebf..50cbdff 100644
--- a/tests/integration/test_suites/depo_test_suite.py
+++ b/tests/integration/test_suites/depo_test_suite.py
@@ -10,11 +10,6 @@ class BaseDepoTestSuite:
 
     class DepoTestSuite(unittest.TestCase):
 
-        TEST_OUT_PATH: str = None
-        TEST_START_DATE: str = None
-        TEST_JOB_DIR: str = None
-
-
         @abc.abstractmethod
         def set_expected_values(self):
             """
@@ -26,8 +21,8 @@ class BaseDepoTestSuite:
             self.ETH_PNG_COUNT: int = 0
 
         def test_standard_run_input_status_success(self):
-            status_file_path = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                            BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR,
+            status_file_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                            IntegrationTestUtils.TEST_JOB_DIR,
                                             "STATUS_SUCCESS")
             success_file_exists: bool = os.path.isfile(status_file_path)
             self.assertTrue(success_file_exists)
@@ -39,12 +34,12 @@ class BaseDepoTestSuite:
             (at least past the region iteration)
             """
 
-            east_africa_image_path = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                                  BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR,
+            east_africa_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                                  IntegrationTestUtils.TEST_JOB_DIR,
                                                   "plotting", "eastafrica", "images", "Weekly",
                                                   "deposition_eastafrica_leaf_rust_total_*_map.png")
-            ethiopia_image_path = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                               BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR,
+            ethiopia_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                               IntegrationTestUtils.TEST_JOB_DIR,
                                                "plotting", "ethiopia", "images", "Weekly",
                                                "deposition_ethiopia_leaf_rust_total_*_map.png")
 
@@ -55,11 +50,11 @@ class BaseDepoTestSuite:
 
 
         def test_standard_run_all_input_csvs_produced(self):
-            east_africa_csv_path = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                                BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR,
+            east_africa_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                                IntegrationTestUtils.TEST_JOB_DIR,
                                                 "plotting", "eastafrica", "input_csvs", "*.csv")
-            ethiopia_csv_path = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                             BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR,
+            ethiopia_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                             IntegrationTestUtils.TEST_JOB_DIR,
                                              "plotting", "ethiopia", "input_csvs", "*.csv")
 
             ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_csv_path)
@@ -69,11 +64,11 @@ class BaseDepoTestSuite:
 
 
         def test_standard_run_all_images_produced(self):
-            east_africa_image_path = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                                  BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR,
+            east_africa_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                                  IntegrationTestUtils.TEST_JOB_DIR,
                                                   "plotting", "eastafrica", "images", "Weekly", "*.png")
-            ethiopia_image_path = os.path.join(BaseDepoTestSuite.DepoTestSuite.TEST_OUT_PATH,
-                                               BaseDepoTestSuite.DepoTestSuite.TEST_JOB_DIR,
+            ethiopia_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                               IntegrationTestUtils.TEST_JOB_DIR,
                                                "plotting", "ethiopia", "images", "Weekly", "*.png")
 
             ea_png_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_image_path)
diff --git a/tests/integration/test_suites/env_suit_test_suite.py b/tests/integration/test_suites/env_suit_test_suite.py
index 08c4dc3..2552dc4 100644
--- a/tests/integration/test_suites/env_suit_test_suite.py
+++ b/tests/integration/test_suites/env_suit_test_suite.py
@@ -10,11 +10,6 @@ class BaseEnvSuitTestSuite:
 
     class EnvSuitTestSuite(unittest.TestCase):
 
-        TEST_OUT_PATH: str = None
-        TEST_START_DATE: str = None
-        TEST_JOB_DIR: str = None
-
-
         @abc.abstractmethod
         def set_expected_values(self):
             """
@@ -28,8 +23,8 @@ class BaseEnvSuitTestSuite:
 
 
         def test_standard_run_input_status_success(self):
-            status_file_path = os.path.join(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH,
-                                            BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR, "STATUS_SUCCESS")
+            status_file_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                            IntegrationTestUtils.TEST_JOB_DIR, "STATUS_SUCCESS")
             success_file_exists: bool = os.path.isfile(status_file_path)
             self.assertTrue(success_file_exists)
 
@@ -40,12 +35,12 @@ class BaseEnvSuitTestSuite:
             (at least past the region iteration)
             """
 
-            east_africa_image_path = os.path.join(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH,
-                                                  BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR,
+            east_africa_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                                  IntegrationTestUtils.TEST_JOB_DIR,
                                                   "plotting", "eastafrica", "images", "Weekly",
                                                   "suitability_eastafrica_leaf_rust_total_*_map.png")
-            ethiopia_image_path = os.path.join(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH,
-                                               BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR,
+            ethiopia_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                               IntegrationTestUtils.TEST_JOB_DIR,
                                                "plotting", "ethiopia", "images", "Weekly",
                                                "suitability_ethiopia_leaf_rust_total_*_map.png")
 
@@ -56,11 +51,11 @@ class BaseEnvSuitTestSuite:
 
 
         def test_standard_run_all_input_csvs_produced(self):
-            east_africa_csv_path = os.path.join(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH,
-                                                BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR,
+            east_africa_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                                IntegrationTestUtils.TEST_JOB_DIR,
                                                 "plotting", "eastafrica", "input_csvs", "*.csv")
-            ethiopia_csv_path = os.path.join(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH,
-                                             BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR,
+            ethiopia_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                             IntegrationTestUtils.TEST_JOB_DIR,
                                              "plotting", "ethiopia", "input_csvs", "*.csv")
 
             ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_csv_path)
@@ -70,11 +65,11 @@ class BaseEnvSuitTestSuite:
 
 
         def test_standard_run_all_images_produced(self):
-            east_africa_image_path = os.path.join(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH,
-                                                  BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR,
+            east_africa_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                                  IntegrationTestUtils.TEST_JOB_DIR,
                                                   "plotting", "eastafrica", "images", "Weekly", "*.png")
-            ethiopia_image_path = os.path.join(BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_OUT_PATH,
-                                               BaseEnvSuitTestSuite.EnvSuitTestSuite.TEST_JOB_DIR,
+            ethiopia_image_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH,
+                                               IntegrationTestUtils.TEST_JOB_DIR,
                                                "plotting", "ethiopia", "images", "Weekly", "*.png")
 
             ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_image_path)
-- 
GitLab