File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import unittest
22import os
33from io import BytesIO
4- from unittest .mock import patch
4+ from unittest .mock import call , patch
55from batch_processor import process_csv_to_fhir
66from tests .utils_for_recordprocessor_tests .utils_for_recordprocessor_tests import create_patch
77
@@ -69,6 +69,7 @@ def test_process_large_file_cp1252(self):
6969 message_body = {
7070 "vaccine_type" : "vax-type-1" ,
7171 "supplier" : "test-supplier" ,
72+ "filename" : "test-filename"
7273 }
7374 self .mock_map_target_disease .return_value = "some disease"
7475
@@ -79,6 +80,10 @@ def test_process_large_file_cp1252(self):
7980 self .mock_logger_warning .assert_called ()
8081 warning_call_args = self .mock_logger_warning .call_args [0 ][0 ]
8182 self .assertTrue (warning_call_args .startswith ("Encoding Error: 'utf-8' codec can't decode byte 0xe9" ))
83+ self .mock_s3_get_object .assert_has_calls ([
84+ call (Bucket = None , Key = "test-filename" ),
85+ call (Bucket = None , Key = "processing/test-filename" ),
86+ ])
8287
8388 def test_process_large_file_utf8 (self ):
8489 """ Test processing a large file with utf-8 encoding """
You can’t perform that action at this time.
0 commit comments