mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
update docstring
This commit is contained in:
+18
-4
@@ -12,16 +12,30 @@ def is_testcase(data_structure):
|
|||||||
data_structure (dict): testcase should always be in the following data structure:
|
data_structure (dict): testcase should always be in the following data structure:
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "desc1",
|
"config": {
|
||||||
"config": {},
|
"name": "desc1",
|
||||||
"api": {},
|
"path": "",
|
||||||
"testcases": [testcase11, testcase12]
|
"variables": [], # optional
|
||||||
|
"request": {} # optional
|
||||||
|
},
|
||||||
|
"teststeps": [
|
||||||
|
teststep1,
|
||||||
|
{ # teststep2
|
||||||
|
'name': 'test step desc2',
|
||||||
|
'variables': [], # optional
|
||||||
|
'extract': [], # optional
|
||||||
|
'validate': [],
|
||||||
|
'request': {},
|
||||||
|
'function_meta': {}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True if data_structure is valid testcase, otherwise False.
|
bool: True if data_structure is valid testcase, otherwise False.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
# TODO: replace with JSON schema validation
|
||||||
if not isinstance(data_structure, dict):
|
if not isinstance(data_structure, dict):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user