mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-16 05:37:37 +08:00
refactor: make testcase
This commit is contained in:
@@ -7,14 +7,10 @@ from httprunner import exceptions, loader
|
||||
class TestLoader(unittest.TestCase):
|
||||
def test_load_testcase_file(self):
|
||||
path = "examples/postman_echo/request_methods/request_with_variables.yml"
|
||||
testcase_json, testcase_obj = loader.load_testcase_file(path)
|
||||
self.assertEqual(
|
||||
testcase_json["config"]["name"], "request methods testcase with variables"
|
||||
)
|
||||
testcase_obj = loader.load_testcase_file(path)
|
||||
self.assertEqual(
|
||||
testcase_obj.config.name, "request methods testcase with variables"
|
||||
)
|
||||
self.assertEqual(len(testcase_json["teststeps"]), 3)
|
||||
self.assertEqual(len(testcase_obj.teststeps), 3)
|
||||
|
||||
def test_load_json_file_file_format_error(self):
|
||||
|
||||
Reference in New Issue
Block a user