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+ batch_start_time = fixed_datetime_str
20+ operation_start_time = fixed_datetime_str
21+ operation_end_time = fixed_datetime_str
1622
1723
1824class DiagnosticsDictionaries :
@@ -90,6 +96,9 @@ def __init__(
9096 local_id : str = DefaultValues .local_id ,
9197 imms_id : str = DefaultValues .imms_id ,
9298 created_at_formatted_string : str = DefaultValues .created_at_formatted_string ,
99+ batch_start_time : str = DefaultValues .batch_start_time ,
100+ operation_start_time : str = DefaultValues .operation_start_time ,
101+ operation_end_time : str = DefaultValues .operation_end_time ,
93102 ):
94103 self .name = f"{ vaccine_type .upper ()} / { supplier .upper ()} { operation_requested } message"
95104 self .file_key = f"{ vaccine_type } _Vaccinations_v5_{ ods_code } _20210730T12000000.csv"
@@ -108,6 +117,9 @@ def __init__(
108117 self .local_id = local_id
109118 self .imms_id = imms_id
110119 self .created_at_formatted_string = created_at_formatted_string
120+ self .batch_start_time = batch_start_time
121+ self .operation_start_time = operation_start_time
122+ self .operation_end_time = operation_end_time
111123
112124 self .queue_name = f"{ supplier } _{ vaccine_type } "
113125
@@ -116,6 +128,9 @@ def __init__(
116128 "supplier" : self .supplier ,
117129 "vaccine_type" : self .vaccine_type ,
118130 "created_at_formatted_string" : self .created_at_formatted_string ,
131+ "batch_start_time" : self .batch_start_time ,
132+ "operation_start_time" : self .operation_start_time ,
133+ "operation_end_time" : self .operation_end_time ,
119134 "row_id" : self .row_id ,
120135 "local_id" : self .local_id ,
121136 "operation_requested" : self .operation_requested ,
@@ -151,6 +166,9 @@ class ValidValues:
151166 mock_message_expected_log_value = {
152167 "function_name" : "ack_processor_convert_message_to_ack_row" ,
153168 "date_time" : fixed_datetime .strftime ("%Y-%m-%d %H:%M:%S" ),
169+ "batch_start_time" : MOCK_MESSAGE_DETAILS .batch_start_time ,
170+ "operation_start_time" : MOCK_MESSAGE_DETAILS .operation_start_time ,
171+ "operation_end_time" : MOCK_MESSAGE_DETAILS .operation_end_time ,
154172 "status" : "success" ,
155173 "supplier" : MOCK_MESSAGE_DETAILS .supplier ,
156174 "file_key" : MOCK_MESSAGE_DETAILS .file_key ,
@@ -242,6 +260,9 @@ class InvalidValues:
242260 Logging_with_no_values = {
243261 "function_name" : "ack_processor_convert_message_to_ack_row" ,
244262 "date_time" : fixed_datetime .strftime ("%Y-%m-%d %H:%M:%S" ),
263+ "batch_start_time" : "unknown" ,
264+ "operation_start_time" : "unknown" ,
265+ "operation_end_time" : "unknown" ,
245266 "status" : "fail" ,
246267 "supplier" : "unknown" ,
247268 "file_key" : "file_key_missing" ,
0 commit comments