@@ -534,6 +534,45 @@ def test__create_single_step__creation_succeed(
534
534
assert created_step .inputs == inputs
535
535
assert not created_step .outputs
536
536
537
+ def test__create_step_without_step_id__creation_succeed (
538
+ self ,
539
+ client : TestMonitorClient ,
540
+ create_results ,
541
+ create_steps ,
542
+ ):
543
+ results = [
544
+ CreateResultRequest (
545
+ part_number = "Python Client Testing" ,
546
+ program_name = "Python Client Test Program" ,
547
+ status = Status .PASSED (),
548
+ )
549
+ ]
550
+ created_result = create_results (results )
551
+ result_id = created_result .results [0 ].id
552
+ name = "Test Step 1"
553
+ data = StepData (
554
+ text = "This is a test step" ,
555
+ parameters = [Measurement (name = "param1" , measurement = "10" )],
556
+ )
557
+ properties = {"property1" : "value1" , "property2" : "value2" }
558
+ keywords = ["keyword1" , "keyword2" ]
559
+ inputs = [NamedValue (name = "input1" , value = "inputValue1" )]
560
+ step = CreateStepRequest (
561
+ result_id = result_id ,
562
+ name = name ,
563
+ data = data ,
564
+ properties = properties ,
565
+ keywords = keywords ,
566
+ inputs = inputs ,
567
+ )
568
+
569
+ response : CreateStepsPartialSuccess = create_steps (steps = [step ])
570
+
571
+ assert response is not None
572
+ assert len (response .steps ) == 1
573
+ created_step = response .steps [0 ]
574
+ assert created_step .step_id is not None
575
+
537
576
def test__create_multiple_steps__multiple_creation_succeed (
538
577
self , client : TestMonitorClient , create_results , create_steps
539
578
):
0 commit comments