@@ -58,7 +58,7 @@ def __init__(self, server_url, devKey, **kwargs):
58
58
# reportTCResult(None, newTestPlanID, None, 'f', '', guess=True,
59
59
# testcaseexternalid=tc_aa_full_ext_id)
60
60
# otherwise xmlrpclib raise an error, that None values are not allowed
61
- self .stepsList = []
61
+ self ._emptyStepsList ()
62
62
self ._changePositionalArgConfig ()
63
63
64
64
def _changePositionalArgConfig (self ):
@@ -469,14 +469,8 @@ def initStep(self, actions, expected_results, execution_type):
469
469
""" initStep :
470
470
Initializes the list which stores the Steps of a Test Case to create
471
471
"""
472
- self .stepsList = []
473
- lst = {}
474
- lst ['step_number' ] = '1'
475
- lst ['actions' ] = actions
476
- lst ['expected_results' ] = expected_results
477
- lst ['execution_type' ] = str (execution_type )
478
- self .stepsList .append (lst )
479
- return True
472
+ self ._emptyStepsList ()
473
+ return self .appendStep (actions , expected_results , execution_type )
480
474
481
475
def appendStep (self , actions , expected_results , execution_type ):
482
476
""" appendStep :
@@ -488,7 +482,11 @@ def appendStep(self, actions, expected_results, execution_type):
488
482
lst ['expected_results' ] = expected_results
489
483
lst ['execution_type' ] = str (execution_type )
490
484
self .stepsList .append (lst )
491
- return True
485
+ return True
486
+
487
+ def _emptyStepsList (self ):
488
+ """ reset .stepsList to an empty List """
489
+ self .stepsList = []
492
490
493
491
def getProjectIDByName (self , projectName ):
494
492
projects = self .getProjects ()
0 commit comments