Merge pull request #948 from ArthurSmoke/master

fix -  get response data with jmespath when variable in validate field
This commit is contained in:
debugtalk
2020-06-29 19:03:59 +08:00
committed by GitHub

View File

@@ -189,12 +189,12 @@ class ResponseObject(object):
check_item = u_validator["check"] check_item = u_validator["check"]
if "$" in check_item: if "$" in check_item:
# check_item is variable or function # check_item is variable or function
check_value = parse_data( check_item = parse_data(
check_item, variables_mapping, functions_mapping check_item, variables_mapping, functions_mapping
) )
check_value = parse_string_value(check_value) check_item = parse_string_value(check_item)
else:
check_value = jmespath.search(check_item, self.resp_obj_meta) check_value = jmespath.search(check_item, self.resp_obj_meta)
# comparator # comparator
assert_method = u_validator["assert"] assert_method = u_validator["assert"]