77class DefaultValues :
88 """Class to hold default values for tests"""
99
10+ fixed_datetime = datetime (2024 , 10 , 29 , 12 , 0 , 0 )
11+ fixed_datetime_str = fixed_datetime .strftime ("%Y-%m-%d %H:%M:%S" )
12+
1013 message_id = "test_file_id"
1114 row_id = "test_file_id#1"
1215 local_id = "test_system_uri^testabc"
1316 imms_id = "test_imms_id"
1417 operation_requested = "CREATE"
1518 created_at_formatted_string = "20211120T12000000"
19+ operation_start_time = fixed_datetime_str
20+ operation_end_time = fixed_datetime_str
1621
1722
1823class DiagnosticsDictionaries :
@@ -90,6 +95,8 @@ def __init__(
9095 local_id : str = DefaultValues .local_id ,
9196 imms_id : str = DefaultValues .imms_id ,
9297 created_at_formatted_string : str = DefaultValues .created_at_formatted_string ,
98+ operation_start_time : str = DefaultValues .operation_start_time ,
99+ operation_end_time : str = DefaultValues .operation_end_time ,
93100 ):
94101 self .name = f"{ vaccine_type .upper ()} / { supplier .upper ()} { operation_requested } message"
95102 self .file_key = f"{ vaccine_type } _Vaccinations_v5_{ ods_code } _20210730T12000000.csv"
@@ -108,6 +115,8 @@ def __init__(
108115 self .local_id = local_id
109116 self .imms_id = imms_id
110117 self .created_at_formatted_string = created_at_formatted_string
118+ self .operation_start_time = operation_start_time
119+ self .operation_end_time = operation_end_time
111120
112121 self .queue_name = f"{ supplier } _{ vaccine_type } "
113122
@@ -116,6 +125,8 @@ def __init__(
116125 "supplier" : self .supplier ,
117126 "vaccine_type" : self .vaccine_type ,
118127 "created_at_formatted_string" : self .created_at_formatted_string ,
128+ "operation_start_time" : self .operation_start_time ,
129+ "operation_end_time" : self .operation_end_time ,
119130 "row_id" : self .row_id ,
120131 "local_id" : self .local_id ,
121132 "operation_requested" : self .operation_requested ,
@@ -151,6 +162,8 @@ class ValidValues:
151162 mock_message_expected_log_value = {
152163 "function_name" : "ack_processor_convert_message_to_ack_row" ,
153164 "date_time" : fixed_datetime .strftime ("%Y-%m-%d %H:%M:%S" ),
165+ "operation_start_time" : MOCK_MESSAGE_DETAILS .operation_start_time ,
166+ "operation_end_time" : MOCK_MESSAGE_DETAILS .operation_end_time ,
154167 "status" : "success" ,
155168 "supplier" : MOCK_MESSAGE_DETAILS .supplier ,
156169 "file_key" : MOCK_MESSAGE_DETAILS .file_key ,
@@ -242,6 +255,8 @@ class InvalidValues:
242255 Logging_with_no_values = {
243256 "function_name" : "ack_processor_convert_message_to_ack_row" ,
244257 "date_time" : fixed_datetime .strftime ("%Y-%m-%d %H:%M:%S" ),
258+ "operation_start_time" : "unknown" ,
259+ "operation_end_time" : "unknown" ,
245260 "status" : "fail" ,
246261 "supplier" : "unknown" ,
247262 "file_key" : "file_key_missing" ,
0 commit comments