mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 08:59:44 +08:00
fix: check if jmespath extractor valid
This commit is contained in:
@@ -47,6 +47,9 @@ def convert_variables(
|
||||
|
||||
|
||||
def convert_jmespath(raw: Text) -> Text:
|
||||
if not isinstance(raw, Text):
|
||||
raise exceptions.TestCaseFormatError(f"Invalid jmespath extractor: {raw}")
|
||||
|
||||
# content.xx/json.xx => body.xx
|
||||
if raw.startswith("content"):
|
||||
raw = f"body{raw[len('content'):]}"
|
||||
|
||||
Reference in New Issue
Block a user