optimize response validation: if validation failed, then raise ValidationError directly

This commit is contained in:
httprunner
2017-08-02 15:10:38 +08:00
parent a18c7bc62f
commit 4d471d7cda
7 changed files with 41 additions and 55 deletions

View File

@@ -14,8 +14,7 @@ class ApiTestCase(unittest.TestCase):
def runTest(self):
""" run testcase and check result.
"""
result = self.test_runner.run_test(self.testcase)
self.assertEqual(result, (True, []))
self.assertTrue(self.test_runner.run_test(self.testcase))
def create_suite(testset):
""" create test suite with a testset, it may include one or several testcases.