Skip to content

Commit ae0876d

Browse files
committed
run standalone
1 parent 825f342 commit ae0876d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

recordprocessor/tests/test_process_csv_to_fhir.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,37 @@
66
import boto3
77
from moto import mock_s3, mock_firehose, mock_dynamodb
88

9-
from constants import FileStatus, AUDIT_TABLE_NAME
10-
from utils_for_recordprocessor_tests.generic_setup_and_teardown import (
9+
from tests.utils_for_recordprocessor_tests.generic_setup_and_teardown import (
1110
GenericSetUp,
1211
GenericTearDown,
1312
)
14-
from utils_for_recordprocessor_tests.utils_for_recordprocessor_tests import add_entry_to_table
15-
from utils_for_recordprocessor_tests.values_for_recordprocessor_tests import (
13+
from tests.utils_for_recordprocessor_tests.utils_for_recordprocessor_tests import add_entry_to_table
14+
from tests.utils_for_recordprocessor_tests.values_for_recordprocessor_tests import (
1615
MockFileDetails,
1716
ValidMockFileContent,
1817
REGION_NAME,
1918
)
20-
from utils_for_recordprocessor_tests.mock_environment_variables import MOCK_ENVIRONMENT_DICT, BucketNames
19+
from tests.utils_for_recordprocessor_tests.mock_environment_variables import MOCK_ENVIRONMENT_DICT, BucketNames
2120

2221
with patch("os.environ", MOCK_ENVIRONMENT_DICT):
22+
from constants import FileStatus, AUDIT_TABLE_NAME
2323
from batch_processor import process_csv_to_fhir
2424

25-
2625
dynamodb_client = boto3.client("dynamodb", region_name=REGION_NAME)
2726
s3_client = boto3.client("s3", region_name=REGION_NAME)
2827
firehose_client = boto3.client("firehose", region_name=REGION_NAME)
2928
test_file = MockFileDetails.rsv_emis
3029

3130

32-
@patch.dict("os.environ", MOCK_ENVIRONMENT_DICT)
3331
@mock_s3
3432
@mock_firehose
3533
@mock_dynamodb
34+
@patch.dict("os.environ", MOCK_ENVIRONMENT_DICT)
3635
class TestProcessCsvToFhir(unittest.TestCase):
3736
"""Tests for process_csv_to_fhir function"""
3837

3938
def setUp(self) -> None:
40-
GenericSetUp(s3_client, firehose_client, dynamodb_client=dynamodb_client)
39+
GenericSetUp(s3_client=s3_client, firehose_client=firehose_client, dynamodb_client=dynamodb_client)
4140

4241
redis_patcher = patch("mappings.redis_client")
4342
self.addCleanup(redis_patcher.stop)
@@ -48,7 +47,7 @@ def setUp(self) -> None:
4847
}])
4948

5049
def tearDown(self) -> None:
51-
GenericTearDown(s3_client, firehose_client, dynamodb_client=dynamodb_client)
50+
GenericTearDown(s3_client=s3_client, firehose_client=firehose_client, dynamodb_client=dynamodb_client)
5251

5352
@staticmethod
5453
def upload_source_file(file_key, file_content):

0 commit comments

Comments
 (0)