mirror of https://gitee.com/a529548204/apitest.git
This commit is contained in:
parent
94990cb35a
commit
68e8c20b04
|
@ -92,8 +92,8 @@ def assert_text(hope_res, real_res,third_data=None,third_datas=None):
|
|||
assert str(r_res) == str(h_res["value"])
|
||||
logging.info("json断言通过, 期望结果'{0}', 实际结果'{1}'".format(h_res, r_res))
|
||||
elif third_datas:
|
||||
if h_res["relevance"]:
|
||||
h_res["value"] = replace_random(str(h_res["value"]), res=third_datas[h_res["relevance"]])
|
||||
if h_res["relevanceCheck"]:
|
||||
h_res["value"] = replace_random(str(h_res["value"]), res=third_datas[h_res["relevanceCheck"]])
|
||||
with allure.step("json断言判断相等"):
|
||||
allure.attach(name="期望结果", body=str(h_res))
|
||||
allure.attach(name='实际实际结果', body=str(r_res))
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# coding:utf-8
|
||||
"""
|
||||
@author: 井松
|
||||
@contact: 529548204@qq.com
|
||||
@file: relevance.py
|
||||
@time: 2021/11/15 17:13
|
||||
"""
|
||||
from cacheout import Cache
|
||||
class Relevance(object):
|
||||
def __init__(self):
|
||||
self.caches = Cache()
|
||||
# def relevance(self,data):
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue