@@ -58,7 +58,7 @@ def __init__(self, server_url, devKey, **kwargs):
5858 # reportTCResult(None, newTestPlanID, None, 'f', '', guess=True,
5959 # testcaseexternalid=tc_aa_full_ext_id)
6060 # otherwise xmlrpclib raise an error, that None values are not allowed
61- self .stepsList = []
61+ self ._emptyStepsList ()
6262 self ._changePositionalArgConfig ()
6363
6464 def _changePositionalArgConfig (self ):
@@ -469,14 +469,8 @@ def initStep(self, actions, expected_results, execution_type):
469469 """ initStep :
470470 Initializes the list which stores the Steps of a Test Case to create
471471 """
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 )
480474
481475 def appendStep (self , actions , expected_results , execution_type ):
482476 """ appendStep :
@@ -488,7 +482,11 @@ def appendStep(self, actions, expected_results, execution_type):
488482 lst ['expected_results' ] = expected_results
489483 lst ['execution_type' ] = str (execution_type )
490484 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 = []
492490
493491 def getProjectIDByName (self , projectName ):
494492 projects = self .getProjects ()
0 commit comments