change: python testcase template

This commit is contained in:
debugtalk
2020-05-14 22:34:18 +08:00
parent ba0611a09a
commit f88845d9d4
13 changed files with 575 additions and 363 deletions

21
httprunner/make_test.py Normal file
View File

@@ -0,0 +1,21 @@
import unittest
from httprunner.make import make_testcase, make
class TestLoader(unittest.TestCase):
def test_make_testcase(self):
path = "examples/postman_echo/request_methods/request_with_variables.yml"
testcase_python_path = make_testcase(path)
self.assertEqual(
testcase_python_path,
"examples/postman_echo/request_methods/request_with_variables_test.py"
)
def test_make_testcase_folder(self):
path = "examples/postman_echo/request_methods/"
testcase_python_list = make(path)
self.assertIn(
"examples/postman_echo/request_methods/request_with_functions_test.py",
testcase_python_list
)