@@ -98,8 +98,8 @@ def test_handler_success_single_record(self):
9898 # Assertions
9999 self .mock_aws_lambda_event .assert_called_once_with (self .single_sqs_event )
100100 self .mock_process_record .assert_called_once_with (mock_event .records [0 ], None )
101- self .mock_logger .info .assert_any_call ("Processing SQS event with %d records" , 1 )
102- self .mock_logger .info .assert_any_call ("Successfully processed all %d records" , 1 )
101+ self .mock_logger .info .assert_any_call ("id_sync processing event with %d records" , 1 )
102+ self .mock_logger .info .assert_any_call ("id_sync successfully processed all %d records" , 1 )
103103
104104 self .assertEqual (result ["status" ], "success" )
105105 self .assertEqual (result ["message" ], "Successfully processed 1 records" )
@@ -122,8 +122,8 @@ def test_handler_success_multiple_records(self):
122122
123123 # Assertions
124124 self .assertEqual (self .mock_process_record .call_count , 2 )
125- self .mock_logger .info .assert_any_call ("Processing SQS event with %d records" , 2 )
126- self .mock_logger .info .assert_any_call ("Successfully processed all %d records" , 2 )
125+ self .mock_logger .info .assert_any_call ("id_sync processing event with %d records" , 2 )
126+ self .mock_logger .info .assert_any_call ("id_sync successfully processed all %d records" , 2 )
127127
128128 self .assertEqual (result ["status" ], "success" )
129129 self .assertEqual (result ["message" ], "Successfully processed 2 records" )
@@ -146,8 +146,7 @@ def test_handler_error_single_record(self):
146146
147147 # Assertions
148148 self .mock_process_record .assert_called_once_with (mock_event .records [0 ], None )
149- self .mock_logger .info .assert_any_call ("Processing SQS event with %d records" , 1 )
150- self .mock_logger .error .assert_called_once_with ("Processed %d records with %d errors" , 1 , 1 )
149+ self .mock_logger .info .assert_any_call ("id_sync processing event with %d records" , 1 )
151150
152151 self .assertEqual (result ["status" ], "error" )
153152 self .assertEqual (result ["message" ], "Processed 1 records with 1 errors" )
@@ -171,8 +170,7 @@ def test_handler_mixed_success_error(self):
171170
172171 # Assertions
173172 self .assertEqual (self .mock_process_record .call_count , 3 )
174- self .mock_logger .info .assert_any_call ("Processing SQS event with %d records" , 3 )
175- self .mock_logger .error .assert_called_once_with ("Processed %d records with %d errors" , 3 , 1 )
173+ self .mock_logger .info .assert_any_call ("id_sync processing event with %d records" , 3 )
176174
177175 self .assertEqual (result ["status" ], "error" )
178176 self .assertEqual (result ["message" ], "Processed 3 records with 1 errors" )
@@ -195,7 +193,6 @@ def test_handler_all_records_fail(self):
195193
196194 # Assertions
197195 self .assertEqual (self .mock_process_record .call_count , 2 )
198- self .mock_logger .error .assert_called_once_with ("Processed %d records with %d errors" , 2 , 2 )
199196
200197 self .assertEqual (result ["status" ], "error" )
201198 self .assertEqual (result ["message" ], "Processed 2 records with 2 errors" )
@@ -370,7 +367,6 @@ def test_handler_error_count_tracking(self):
370367
371368 # Assertions - should track 2 errors out of 4 records
372369 self .assertEqual (self .mock_process_record .call_count , 4 )
373- self .mock_logger .error .assert_called_once_with ("Processed %d records with %d errors" , 4 , 2 )
374370
375371 self .assertEqual (result ["status" ], "error" )
376372 self .assertEqual (result ["message" ], "Processed 4 records with 2 errors" )
@@ -391,7 +387,7 @@ def test_handler_logs_correct_event_type(self):
391387 handler (self .single_sqs_event , None )
392388
393389 # Check that it specifically logs "SQS event"
394- self .mock_logger .info .assert_any_call ("Processing SQS event with %d records" , 1 )
390+ self .mock_logger .info .assert_any_call ("id_sync processing event with %d records" , 1 )
395391
396392
397393if __name__ == '__main__' :
0 commit comments