mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-08 17:29:34 +08:00
change: python testcase template
This commit is contained in:
21
httprunner/make_test.py
Normal file
21
httprunner/make_test.py
Normal 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
|
||||
)
|
||||
Reference in New Issue
Block a user