|
208 | 208 | 'summary': '<p>\n\tThis is the summary of the Test Case B3</p>\n',
|
209 | 209 | 'steps': [{'step_number': '1', 'actions': '<p>\n\tStep action 1 -b3</p>\n', 'execution_type': '2', 'active': '1', 'id': '8171', 'expected_results': '<p>\n\tStep result 1 - b3</p>\n'},
|
210 | 210 | {'step_number': '2', 'actions': '<p>\n\tStep action 2 -b3</p>\n', 'execution_type': '2', 'active': '1', 'id': '8172', 'expected_results': '<p>\n\tStep result 2 - b3</p>\n'}],
|
211 |
| - 'author_id': '2'}] |
| 211 | + 'author_id': '2'}], |
| 212 | + |
| 213 | + '4711' : [{'node_order': '0', 'is_open': '1', |
| 214 | + 'keywords': {'1': {'keyword_id': '1', 'notes': 'a key word', 'testcase_id': '8144', 'keyword': 'KeyWord01'}, |
| 215 | + '3': {'keyword_id': '3', 'notes': 'a third key word', 'testcase_id': '8144', 'keyword': 'KeyWord03'}}, |
| 216 | + 'id': '8144', 'node_type_id': '3', 'layout': '1', 'tc_external_id': '2', 'parent_id': '8134', 'version': '1', |
| 217 | + 'details': '<p>\n\tDetails of the Test Suite B</p>\n', 'estimated_exec_duration': '3.00', 'updater_id': '2', 'status': '1', |
| 218 | + 'importance': '3', 'modification_ts': '2014-06-30 20:45:40', 'execution_type': '1', |
| 219 | + 'preconditions': '<p>\n\tthese are the preconditions</p>\n', 'active': '1', 'creation_ts': '2014-06-28 22:06:17', |
| 220 | + 'node_table': 'testcases', 'tcversion_id': '8145', 'name': 'TESTCASE_B', |
| 221 | + 'summary': '<p>\n\tThis is the summary of the Test Case B</p>\n', |
| 222 | + 'steps': [{'step_number': '1', 'actions': 'Step action 1 -b ', 'execution_type': '2', 'active': '1', 'id': '8151', 'expected_results': 'Step result 1 - b'}], |
| 223 | + 'author_id': '1'} ], |
| 224 | + |
| 225 | + 'noKeywords' : [{'node_order': '0', 'is_open': '1', |
| 226 | + 'id': '8144', 'node_type_id': '3', 'layout': '1', 'tc_external_id': '2', 'parent_id': '8134', 'version': '1', |
| 227 | + 'details': '<p>\n\tDetails of the Test Suite B</p>\n', 'estimated_exec_duration': '3.00', 'updater_id': '2', 'status': '1', |
| 228 | + 'importance': '3', 'modification_ts': '2014-06-30 20:45:40', 'execution_type': '1', |
| 229 | + 'preconditions': '<p>\n\tthese are the preconditions</p>\n', 'active': '1', 'creation_ts': '2014-06-28 22:06:17', |
| 230 | + 'node_table': 'testcases', 'tcversion_id': '8145', 'name': 'TESTCASE_B', |
| 231 | + 'summary': '<p>\n\tThis is the summary of the Test Case B</p>\n', |
| 232 | + 'steps': [{'step_number': '1', 'actions': 'Step action 1 -b ', 'execution_type': '2', 'active': '1', 'id': '8151', 'expected_results': 'Step result 1 - b'}], |
| 233 | + 'author_id': '1'} ] |
| 234 | + |
212 | 235 | },
|
213 | 236 | 'getTestCase' : {
|
214 | 237 | '8144' : [{'full_tc_external_id': 'NPROAPI-2', 'id': '8145', 'tc_external_id': '2', 'version': '1',
|
@@ -517,7 +540,31 @@ def test_listKeywordsForTC_None(self):
|
517 | 540 | response = self.api.listKeywordsForTC('NPROAPI-4')
|
518 | 541 | self.assertEqual([], response)
|
519 | 542 |
|
| 543 | + def test_listKeywordsForTS_NoneTC(self): |
| 544 | + self.api.loadScenario(SCENARIO_KEYWORDS) |
| 545 | + response = self.api.listKeywordsForTS('noTestCase') |
| 546 | + self.assertEqual({}, response) |
| 547 | + |
| 548 | + def test_listKeywordsForTS_NoneKW(self): |
| 549 | + self.api.loadScenario(SCENARIO_KEYWORDS) |
| 550 | + response = self.api.listKeywordsForTS('noKeywords') |
| 551 | + self.assertEqual({'8144' : []}, response) |
| 552 | + |
| 553 | + def test_listKeywordsForTS_Id_Int(self): |
| 554 | + self.api.loadScenario(SCENARIO_KEYWORDS) |
| 555 | + response = self.api.listKeywordsForTS(4711) |
| 556 | + self.assertEqual({'8144' : ['KeyWord01', 'KeyWord03']}, response) |
520 | 557 |
|
| 558 | + def test_listKeywordsForTS_Id_String(self): |
| 559 | + self.api.loadScenario(SCENARIO_KEYWORDS) |
| 560 | + response = self.api.listKeywordsForTS('4711') |
| 561 | + self.assertEqual({'8144' : ['KeyWord01', 'KeyWord03']}, response) |
| 562 | + |
| 563 | + def test_listKeywordsForTS_Multi(self): |
| 564 | + self.api.loadScenario(SCENARIO_KEYWORDS) |
| 565 | + response = self.api.listKeywordsForTS('deepFalse3') |
| 566 | + self.assertEqual({'8144' : ['KeyWord01', 'KeyWord03'], |
| 567 | + '8159' : ['KeyWord02'], '8169' : []}, response) |
521 | 568 |
|
522 | 569 |
|
523 | 570 |
|
|
0 commit comments