6262 'twoPlatforms' : {'dutch' : {'id' : '1' , 'name' : 'dutch' },
6363 'platt' : {'id' : '2' , 'name' : 'platt' }},
6464 'noPlatform' : {}
65- }
65+ },
66+ 'reportTCResult' : [{'status' : True , 'operation' : 'reportTCResult' ,
67+ 'message' : 'Success!' , 'overwrite' : False , 'id' : '773' }]
6668 }
6769
6870# scenario_tl198 used by test with older responses, changed in TL 1.9.9
@@ -593,8 +595,23 @@ def test_getRequirementCustomFieldDesignValue_full(self):
593595 self .assertEqual ('a custom Req string' , response ['value' ])
594596 self .assertEqual ('1' , response ['enable_on_design' ])
595597 self .assertEqual ('0' , response ['enable_on_testplan_design' ])
596- self .assertEqual ('0' , response ['enable_on_execution' ])
597-
598+ self .assertEqual ('0' , response ['enable_on_execution' ])
599+
600+ def test_reportTCResult_user (self ):
601+ self .api .loadScenario (SCENARIO_A )
602+ response = self .api .reportTCResult (4712 , 'p' , testcaseid = 4711 ,
603+ buildname = 'build 4713' , notes = 'note 4714' ,
604+ user = 'a login name' )
605+ self .assertEqual ('reportTCResult' , response [0 ]['operation' ])
606+ self .assertEqual (self .api .devKey , self .api .callArgs ['devKey' ])
607+ self .assertEqual ('a login name' , self .api .callArgs ['user' ])
608+
609+ def test_whatArgs_reportTCResult (self ):
610+ argsDescription = self .api .whatArgs ('reportTCResult' )
611+ self .assertIn ('user=<user>' , argsDescription )
612+
613+
614+
598615if __name__ == "__main__" :
599616 #import sys;sys.argv = ['', 'Test.testName']
600617 unittest .main ()
0 commit comments