File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
lambdas/recordprocessor/tests Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 55
66from batch_processor import process_csv_to_fhir
77from utils_for_recordprocessor_tests .utils_for_recordprocessor_tests import (
8+ MOCK_ENVIRONMENT_DICT ,
9+ BucketNames ,
810 create_patch ,
911)
1012
1113
14+ @patch .dict ("os.environ" , MOCK_ENVIRONMENT_DICT )
1215class TestProcessorEdgeCases (unittest .TestCase ):
1316 def setUp (self ):
1417 self .mock_logger_info = create_patch ("logging.Logger.info" )
@@ -81,11 +84,10 @@ def test_process_large_file_cp1252(self):
8184 self .mock_logger_warning .assert_called ()
8285 warning_call_args = self .mock_logger_warning .call_args [0 ][0 ]
8386 self .assertTrue (warning_call_args .startswith ("Encoding Error: 'utf-8' codec can't decode byte 0xe9" ))
84- # TODO: when running standalone this expects BucketNames.SOURCE. not clear why.
8587 mock_s3 .get_object .assert_has_calls (
8688 [
87- call (Bucket = None , Key = "test-filename" ),
88- call (Bucket = None , Key = "processing/test-filename" ),
89+ call (Bucket = BucketNames . SOURCE , Key = "test-filename" ),
90+ call (Bucket = BucketNames . SOURCE , Key = "processing/test-filename" ),
8991 ]
9092 )
9193
You can’t perform that action at this time.
0 commit comments