mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 18:59:39 +08:00
fix: validate with variable or function whose evaluation result is "" or not text
This commit is contained in:
@@ -197,7 +197,11 @@ class ResponseObject(object):
|
||||
)
|
||||
check_item = parse_string_value(check_item)
|
||||
|
||||
check_value = jmespath.search(check_item, self.resp_obj_meta)
|
||||
if check_item and isinstance(check_item, Text):
|
||||
check_value = jmespath.search(check_item, self.resp_obj_meta)
|
||||
else:
|
||||
# variable or function evaluation result is "" or not text
|
||||
check_value = check_item
|
||||
|
||||
# comparator
|
||||
assert_method = u_validator["assert"]
|
||||
|
||||
Reference in New Issue
Block a user