本文整理汇总了Python中testlink.TestLinkHelper.updateTestCaseCustomFieldDesignValue方法的典型用法代码示例。如果您正苦于以下问题:Python TestLinkHelper.updateTestCaseCustomFieldDesignValue方法的具体用法?Python TestLinkHelper.updateTestCaseCustomFieldDesignValue怎么用?Python TestLinkHelper.updateTestCaseCustomFieldDesignValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testlink.TestLinkHelper
的用法示例。
在下文中一共展示了TestLinkHelper.updateTestCaseCustomFieldDesignValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestLinkAPIGenericOfflineTestCase
# 需要导入模块: from testlink import TestLinkHelper [as 别名]
# 或者: from testlink.TestLinkHelper import updateTestCaseCustomFieldDesignValue [as 别名]
#.........这里部分代码省略.........
def test_getTestCaseCustomFieldDesignValue_notAssigned(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
with self.assertRaisesRegex(TLResponseError, '9003.*Custom Field.*not assigned'):
response = self.api.getTestCaseCustomFieldDesignValue('GPROAPI8-2',
1, '7760', 'cf_notAssigned', details='full')
def test_getTestCaseCustomFieldDesignValue_full(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldDesignValue('GPROAPI8-2',
1, '7760', 'cf_full', details='full')
self.assertEqual('a custom spec design string', response['value'])
self.assertEqual('1', response['enable_on_design'])
self.assertEqual('0', response['enable_on_testplan_design'])
self.assertEqual('0', response['enable_on_execution'])
def test_getTestCaseCustomFieldDesignValue_value(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldDesignValue('GPROAPI8-2',
1, '7760', 'cf_value', details='value')
self.assertEqual('a custom spec design string', response)
def test_getTestCaseCustomFieldDesignValue_valueEmpty(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldDesignValue('GPROAPI8-2',
1, '7760', 'cf_valueEmpty', details='value')
self.assertEqual('', response)
def test_getTestCaseCustomFieldDesignValue_simple(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldDesignValue('GPROAPI8-2',
1, '7760', 'cf_simple', details='simple')
self.assertEqual('a custom spec design string', response['value'])
def test_updateTestCaseCustomFieldDesignValue_simple(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.updateTestCaseCustomFieldDesignValue('GPROAPI8-2',
1, '7760', {'cf_field1' : 'a_string'})
self.assertEqual('', response)
def test_getTestCaseCustomFieldExecutionValue_notAssigned(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldExecutionValue(
'cf_notAssigned', '7760', 1, '792', '7761')
self.assertEqual(None, response)
self.assertEqual(self.api.devKey, self.api.callArgs['devKey'])
def test_getTestCaseCustomFieldExecutionValue_full(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldExecutionValue(
'cf_full', '7760', 1, '792', '7761')
self.assertEqual('a custom exec string', response['value'])
self.assertEqual('0', response['enable_on_design'])
self.assertEqual('0', response['enable_on_testplan_design'])
self.assertEqual('1', response['enable_on_execution'])
def test_getTestCaseCustomFieldTestPlanDesignValue_notAssigned(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldTestPlanDesignValue(
'cf_notAssigned', '7760', 1, '7761', '779')
self.assertEqual(None, response)
self.assertEqual(self.api.devKey, self.api.callArgs['devKey'])
def test_getTestCaseCustomFieldTestPlanDesignValue_full(self):
self.api.loadScenario(SCENARIO_CUSTOM_FIELDS)
response = self.api.getTestCaseCustomFieldTestPlanDesignValue(
'cf_full', '7760', 1, '7761', '779')
示例2: TestLinkAPIGenericOnlineTestCase
# 需要导入模块: from testlink import TestLinkHelper [as 别名]
# 或者: from testlink.TestLinkHelper import updateTestCaseCustomFieldDesignValue [as 别名]
#.........这里部分代码省略.........
# case: TL configuration allows deletion of executions
# response returns Success, even if executionID is unkown
self.assertEqual([{'status': True, 'message': 'Success!', 'id': 40000711,
'operation': 'deleteExecution'}], response)
except TLResponseError as tl_err:
# case: TL configuration does not allow deletion of executions
# Expects: 232: Configuration does not allow delete executions
self.assertEqual(232, tl_err.code)
def test_setTestCaseExecutionType_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000712'):
self.client.setTestCaseExecutionType('N-40000711', 1, 40000712, 1)
def test_assignRequirements_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000712'):
self.client.assignRequirements('N-40000711', 40000712,
[{'req_spec' : 40000713, 'requirements' : [40000714, 40000717]},
{'req_spec' : 4723, 'requirements' : [4725]}])
def test_getExecCountersByBuild_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '3000.*40000711'):
self.client.getExecCountersByBuild(40000711)
def test_getTestCaseCustomFieldExecutionValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '236.*version/executionid'):
self.client.getTestCaseCustomFieldExecutionValue(
'cf_full', '40000711', 1, '715', '40000713')
def test_getTestCaseCustomFieldTestPlanDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
self.client.getTestCaseCustomFieldTestPlanDesignValue(
'cf_full', '40000711', 1, '40000713', '615')
def test_updateTestCaseCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
self.client.updateTestCaseCustomFieldDesignValue(
'TC-40000712', 1, 40000711, {'cf_field1' : 'value1',
'cf_field2' : 'value2'})
def test_getTestSuiteCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
self.client.getTestSuiteCustomFieldDesignValue(
'cf_full', 40000711, 40000713)
def test_getTestPlanCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
self.client.getTestPlanCustomFieldDesignValue(
'cf_full', 40000711, 40000712)
def test_getReqSpecCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
self.client.getReqSpecCustomFieldDesignValue(
'cf_full', 40000711, 4732)
def test_getRequirementCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '7000.*40000711'):
self.client.getRequirementCustomFieldDesignValue(
'cf_full', 40000711, 4734)
def test_assignTestCaseExecutionTask_unknownID(self):
with self.assertRaisesRegex(TLResponseError, '3000.*40000711'):
self.client.assignTestCaseExecutionTask('username', 40000711, 'TC-40000712',
buildname='build 40000713',
platformname='platform 40000714')
def test_getTestCaseBugs_unknownID(self):
示例3: TestLinkAPIOnlineTestCase
# 需要导入模块: from testlink import TestLinkHelper [as 别名]
# 或者: from testlink.TestLinkHelper import updateTestCaseCustomFieldDesignValue [as 别名]
#.........这里部分代码省略.........
)
except TLResponseError as tl_err:
# case: TL configuration does not allow deletion of executions
# Expects: 232: Configuration does not allow delete executions
self.assertEqual(232, tl_err.code)
def test_setTestCaseExecutionType_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000712"):
self.client.setTestCaseExecutionType("N-40000711", 1, 40000712, 1)
def test_assignRequirements_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000712"):
self.client.assignRequirements(
"N-40000711",
40000712,
[
{"req_spec": 40000713, "requirements": [40000714, 40000717]},
{"req_spec": 4723, "requirements": [4725]},
],
)
def test_getExecCountersByBuild_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "3000.*40000711"):
self.client.getExecCountersByBuild(40000711)
def test_getTestCaseCustomFieldExecutionValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "236.*version/executionid"):
self.client.getTestCaseCustomFieldExecutionValue("cf_full", "40000711", 1, "715", "40000713")
def test_getTestCaseCustomFieldTestPlanDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
self.client.getTestCaseCustomFieldTestPlanDesignValue("cf_full", "40000711", 1, "40000713", "615")
def test_updateTestCaseCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
self.client.updateTestCaseCustomFieldDesignValue(
"TC-40000712", 1, 40000711, {"cf_field1": "value1", "cf_field2": "value2"}
)
def test_getTestSuiteCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
self.client.getTestSuiteCustomFieldDesignValue("cf_full", 40000711, 40000713)
def test_getTestPlanCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
self.client.getTestPlanCustomFieldDesignValue("cf_full", 40000711, 40000712)
def test_getReqSpecCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
self.client.getReqSpecCustomFieldDesignValue("cf_full", 40000711, 4732)
def test_getRequirementCustomFieldDesignValue_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "7000.*40000711"):
self.client.getRequirementCustomFieldDesignValue("cf_full", 40000711, 4734)
def test_assignTestCaseExecutionTask_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "3000.*40000711"):
self.client.assignTestCaseExecutionTask(
"username", 40000711, "TC-40000712", buildname="build 40000713", platformname="platform 40000714"
)
def test_getTestCaseBugs_unknownID(self):
with self.assertRaisesRegex(TLResponseError, "3000.*40000711"):
self.client.getTestCaseBugs(
40000711, testcaseexternalid="TC-40000712", buildname="build 40000713", platformname="platform 40000714"
)