@@ -308,7 +308,6 @@ def test_lambda_handler_extended_attributes_success(self, mock_get_redis_client)
308308 self .assertEqual (item [AuditTableKeys .TIMESTAMP ]["S" ], test_cases [0 ].created_at_formatted_string )
309309 self .assertEqual (item [AuditTableKeys .EXPIRES_AT ]["N" ], str (test_cases [0 ].expires_at ))
310310 # File should be moved to destination/
311- # The implementation constructs the destination key with a double slash. Reflect that here.
312311 dest_key = f"dps_destination/{ test_cases [0 ].file_key } "
313312 print (f" destination file is at { s3_client .list_objects (Bucket = BucketNames .DESTINATION )} " )
314313 retrieved = s3_client .get_object (Bucket = BucketNames .DESTINATION , Key = dest_key )
@@ -341,7 +340,7 @@ def test_lambda_handler_extended_attributes_failure(self, mock_get_redis_client)
341340 Body = MOCK_EXTENDED_ATTRIBUTES_FILE_CONTENT ,
342341 )
343342
344- # Mock Redis so EA validation passes: supplier present and COVID valid
343+ # Mock Redis so Extended Attributes validation passes: supplier present and COVID valid
345344 mock_redis = fakeredis .FakeStrictRedis ()
346345 mock_redis .hget = Mock (side_effect = create_mock_hget ({"X8E5B" : "RAVS" }, {}))
347346 mock_redis .hkeys = Mock (return_value = ["COVID" , * all_vaccine_types_in_this_test_file ])
@@ -414,7 +413,7 @@ def raise_connection_error(*args, **kwargs):
414413 with patch ("file_name_processor.uuid4" , return_value = test_case .message_id ):
415414 lambda_handler (self .make_event ([self .make_record (test_case .file_key )]), None )
416415
417- # Audit should be Failed with unknown queue_name, file moved to archive
416+ # Audit status should be Failed with unknown queue_name, file moved to archive
418417 item = self .get_audit_table_items ()[0 ]
419418 self .assertEqual (item [AuditTableKeys .MESSAGE_ID ]["S" ], test_case .message_id )
420419 self .assertEqual (item [AuditTableKeys .FILENAME ]["S" ], test_case .file_key )
@@ -439,7 +438,7 @@ def test_lambda_handler_extended_attributes_invalid_timestamp(self, mock_get_red
439438 s3_client .put_object (
440439 Bucket = BucketNames .SOURCE , Key = invalid_timestamp_key , Body = MOCK_EXTENDED_ATTRIBUTES_FILE_CONTENT
441440 )
442- with patch ("file_name_processor.uuid4" , return_value = "EA_bad_ts_id " ):
441+ with patch ("file_name_processor.uuid4" , return_value = "invalid_timestamp_id " ):
443442 lambda_handler (self .make_event ([self .make_record (invalid_timestamp_key )]), None )
444443 # Failed audit and archive
445444 item1 = self .get_audit_table_items ()[0 ]
@@ -451,7 +450,7 @@ def test_lambda_handler_extended_attributes_invalid_timestamp(self, mock_get_red
451450 s3_client .put_object (
452451 Bucket = BucketNames .SOURCE , Key = invalid_timestamp_key2 , Body = MOCK_EXTENDED_ATTRIBUTES_FILE_CONTENT
453452 )
454- with patch ("file_name_processor.uuid4" , return_value = "EA_bad_ts_id2 " ):
453+ with patch ("file_name_processor.uuid4" , return_value = "invalid_timestamp_id2 " ):
455454 lambda_handler (self .make_event ([self .make_record (invalid_timestamp_key2 )]), None )
456455 # Failed audit and archive
457456 item2 = self .get_audit_table_items ()[- 1 ]
0 commit comments