@@ -230,13 +230,17 @@ def test_step_details_from_dict():
230230 error_data = {"ErrorMessage" : "Step error" }
231231 data = {
232232 "Attempt" : 2 ,
233- "NextAttemptTimestamp" : "2023-01-01T00:00:00Z" ,
233+ "NextAttemptTimestamp" : datetime .datetime (
234+ 2023 , 1 , 1 , 0 , 0 , 0 , tzinfo = datetime .UTC
235+ ),
234236 "Result" : "step_result" ,
235237 "Error" : error_data ,
236238 }
237239 details = StepDetails .from_dict (data )
238240 assert details .attempt == 2
239- assert details .next_attempt_timestamp == "2023-01-01T00:00:00Z"
241+ assert details .next_attempt_timestamp == datetime .datetime (
242+ 2023 , 1 , 1 , 0 , 0 , 0 , tzinfo = datetime .UTC
243+ )
240244 assert details .result == "step_result"
241245 assert details .error .message == "Step error"
242246
@@ -246,13 +250,17 @@ def test_step_details_all_fields():
246250 error_data = {"ErrorMessage" : "Step failed" , "ErrorType" : "StepError" }
247251 data = {
248252 "Attempt" : 3 ,
249- "NextAttemptTimestamp" : "2023-01-01T12:00:00Z" ,
253+ "NextAttemptTimestamp" : datetime .datetime (
254+ 2023 , 1 , 1 , 12 , 0 , 0 , tzinfo = datetime .UTC
255+ ),
250256 "Result" : "step_success" ,
251257 "Error" : error_data ,
252258 }
253259 details = StepDetails .from_dict (data )
254260 assert details .attempt == 3
255- assert details .next_attempt_timestamp == "2023-01-01T12:00:00Z"
261+ assert details .next_attempt_timestamp == datetime .datetime (
262+ 2023 , 1 , 1 , 12 , 0 , 0 , tzinfo = datetime .UTC
263+ )
256264 assert details .result == "step_success"
257265 assert details .error .message == "Step failed"
258266 assert details .error .type == "StepError"
0 commit comments