Skip to content

Commit 776eafc

Browse files
committed
tidy
1 parent 29324d5 commit 776eafc

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

recordprocessor/tests/test_batch_processor.py renamed to recordprocessor/tests/test_recordprocessor_edge_cases.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
from io import BytesIO
44
from unittest.mock import patch
55
from batch_processor import process_csv_to_fhir
6+
from tests.utils_for_recordprocessor_tests.utils_for_recordprocessor_tests import create_patch
67

78

8-
def create_patch(target: str):
9-
patcher = patch(target)
10-
return patcher.start()
11-
12-
13-
class TestProcessCsvToFhir(unittest.TestCase):
9+
class TestProcessorEdgeCases(unittest.TestCase):
1410

1511
def setUp(self):
1612
self.mock_logger_info = create_patch("logging.Logger.info")

recordprocessor/tests/test_recordprocessor_main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
REGION_NAME,
2424
)
2525
from tests.utils_for_recordprocessor_tests.mock_environment_variables import MOCK_ENVIRONMENT_DICT, BucketNames, Kinesis
26+
from tests.utils_for_recordprocessor_tests.utils_for_recordprocessor_tests import create_patch
2627

2728
with patch("os.environ", MOCK_ENVIRONMENT_DICT):
2829
from constants import Diagnostics
@@ -52,6 +53,7 @@ def setUp(self) -> None:
5253
"code": "55735004",
5354
"term": "Respiratory syncytial virus infection (disorder)"
5455
}])
56+
self.mock_logger_info = create_patch("logging.Logger.info")
5557

5658
def tearDown(self) -> None:
5759
GenericTearDown(s3_client, firehose_client, kinesis_client)

recordprocessor/tests/utils_for_recordprocessor_tests/utils_for_recordprocessor_tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,8 @@ def assert_audit_table_entry(file_details: FileDetails, expected_status: FileSta
102102
TableName=AUDIT_TABLE_NAME, Key={AuditTableKeys.MESSAGE_ID: {"S": file_details.message_id}}
103103
).get("Item")
104104
assert table_entry == {**file_details.audit_table_entry, "status": {"S": expected_status}}
105+
106+
107+
def create_patch(target: str):
108+
patcher = patch(target)
109+
return patcher.start()

0 commit comments

Comments
 (0)