make ApiTestSuite class to hold ApiTestCase

This commit is contained in:
debugtalk
2017-09-19 23:33:09 +08:00
parent 0dad384f01
commit e0e8f2d2ec
3 changed files with 22 additions and 17 deletions

View File

@@ -18,7 +18,7 @@ class TestTask(ApiServerUnittest):
def test_create_suite(self):
testcase_file_path = os.path.join(os.getcwd(), 'tests/data/demo_testset_variables.yml')
testsets = load_testcases_by_path(testcase_file_path)
suite = task.create_suite(testsets[0])
suite = task.ApiTestSuite(testsets[0])
self.assertEqual(suite.countTestCases(), 3)
for testcase in suite:
self.assertIsInstance(testcase, task.ApiTestCase)