mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
remove unused files
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
bind_variables:
|
||||
variables:
|
||||
TOKEN: "debugtalk"
|
||||
token: $TOKEN
|
||||
|
||||
builtin_functions:
|
||||
variables:
|
||||
length: ${len(debugtalk)}
|
||||
smallest: ${min(2, 3, 8)}
|
||||
largest: ${max(2, 3, 8)}
|
||||
@@ -1,25 +0,0 @@
|
||||
- config:
|
||||
name: "user management testcase."
|
||||
parameters:
|
||||
user_agent: ["iOS/10.1", "iOS/10.2", "iOS/10.3"]
|
||||
username-password:
|
||||
- ["test1","111111"]
|
||||
- ["test2","222222"]
|
||||
variables:
|
||||
username: test1
|
||||
user_agent: "iOS/10.1"
|
||||
device_sn: ${gen_random_string(15)}
|
||||
os_platform: 'ios'
|
||||
app_version: 2.8.5
|
||||
base_url: ${get_base_url()}
|
||||
output:
|
||||
- token
|
||||
|
||||
- test:
|
||||
name: get token with $user_agent and $username
|
||||
api: api/get_token.yml
|
||||
extract:
|
||||
- token: content.token
|
||||
validate:
|
||||
- "eq": ["status_code", 200]
|
||||
- "len_eq": ["content.token", 16]
|
||||
@@ -15,8 +15,6 @@ class TestContext(ApiServerUnittest):
|
||||
functions=project_mapping["functions"],
|
||||
variables={"SECRET_KEY": "DebugTalk"}
|
||||
)
|
||||
testcase_file_path = os.path.join(os.getcwd(), 'tests/data/demo_binds.yml')
|
||||
self.testcases = loader.load_file(testcase_file_path)
|
||||
|
||||
def test_init_context_functions(self):
|
||||
context_functions = self.context.FUNCTIONS_MAPPING
|
||||
|
||||
@@ -112,19 +112,15 @@ class TestFileLoader(unittest.TestCase):
|
||||
def test_load_folder_files(self):
|
||||
folder = os.path.join(os.getcwd(), 'tests')
|
||||
file1 = os.path.join(os.getcwd(), 'tests', 'test_utils.py')
|
||||
file2 = os.path.join(os.getcwd(), 'tests', 'data', 'demo_binds.yml')
|
||||
file2 = os.path.join(os.getcwd(), 'tests', 'api', 'reset_all.yml')
|
||||
|
||||
files = loader.load_folder_files(folder, recursive=False)
|
||||
self.assertNotIn(file2, files)
|
||||
self.assertEqual(files, [])
|
||||
|
||||
files = loader.load_folder_files(folder)
|
||||
self.assertIn(file2, files)
|
||||
self.assertNotIn(file1, files)
|
||||
|
||||
files = loader.load_folder_files(folder)
|
||||
api_file = os.path.join(os.getcwd(), 'tests', 'api', 'reset_all.yml')
|
||||
self.assertIn(api_file, files)
|
||||
|
||||
files = loader.load_folder_files("not_existed_foulder", recursive=False)
|
||||
self.assertEqual([], files)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user