LastResult中result字段表示上次执行期望断言结果,未设置期望断言则为True,之前是False
This commit is contained in:
parent
a10d3c0cf4
commit
c8e9b98a2b
|
@ -31,8 +31,8 @@ def get_expectations_result(expectations, request, expectation_logic) -> bool:
|
|||
last_failure_msg = '[期望值: %s] [实际值: 请参考“响应-响应体”中内容]' % expectation.value_
|
||||
# 解决HTTP响应文本内容包含html片段导致前台解析问题 end
|
||||
expectation.update_assert_result(last_result=last_result, last_failure_msg=last_failure_msg)
|
||||
if len(rets) == 0: # 未设置期望断言则结果为False
|
||||
return False
|
||||
if len(rets) == 0: # 未设置期望断言则结果为True
|
||||
return True
|
||||
if expectation_logic == EXPECTATION_LOGIC.AND:
|
||||
return all(rets)
|
||||
if expectation_logic == EXPECTATION_LOGIC.OR:
|
||||
|
|
Loading…
Reference in New Issue