From 730b17af02048250b5bd660a31f400b1bef478b6 Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Wed, 11 Oct 2023 15:04:45 +0100 Subject: [PATCH] fixing depo half fat test --- .../partial/integration_test_utils.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/integration/partial/integration_test_utils.py b/tests/integration/partial/integration_test_utils.py index 5b17c3d..28ab0f2 100644 --- a/tests/integration/partial/integration_test_utils.py +++ b/tests/integration/partial/integration_test_utils.py @@ -10,6 +10,9 @@ from zipfile import ZipFile from HtmlTestRunner import HTMLTestRunner +from Processor import Processor +from ProcessorDeposition import ProcessorDeposition + class IntegrationTestUtils: @@ -180,9 +183,7 @@ class IntegrationTestUtils: # need EMAIL_CRED in the environment before we import Processor os.environ["EMAIL_CRED"] = IntegrationTestUtils.EMAIL_CRED_PATH - import Processor - reload(Processor) - from Processor import run_Process, set_log_level + processor = ProcessorDeposition() args_dict: dict = {} @@ -199,10 +200,10 @@ class IntegrationTestUtils: args_dict[key] = value log_level = args_dict['log_level'] - set_log_level(log_level) + processor.set_log_level(log_level) try: - run_Process(args_dict) + processor.run_Process(args_dict) except SystemExit: # we will eventually want to throw these to the calling class to be dealt with pass @@ -216,9 +217,7 @@ class IntegrationTestUtils: # need EMAIL_CRED in the environment before we import Processor os.environ["EMAIL_CRED"] = email_cred_path - import Processor - reload(Processor) # reload the class to reset all variables - from Processor import run_Process, set_log_level + processor = Processor() args_dict: dict = {} @@ -235,10 +234,10 @@ class IntegrationTestUtils: args_dict[key] = value log_level = args_dict['log_level'] - set_log_level(log_level) + processor.set_log_level(log_level) try: - run_Process(args_dict) + processor.run_Process(args_dict) except SystemExit: # we will eventually want to throw these to the calling class to be dealt with pass -- GitLab