Commit 13859465 authored by liguangyu06's avatar liguangyu06
Browse files

提交电商项目用例

parent 13b3da0e
Pipeline #6911 failed with stages
in 3 seconds
import pymysql
import os
import sys
from common.confop import confOP
from common.db.sql.sqlByIdb import sqlByIdb
import pymongo
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
class dbOP():
def __init__(self, path=rootPath):
self.path = path
def selectSql(self, schema, param=[], db="bj_db"):
host = mySql().getConf(db)[0]
port = mySql().getConf(db)[1]
user = mySql().getConf(db)[2]
pwd = mySql().getConf(db)[3]
value = confOP().getYamlValue("sql")
if schema not in value:
value = confOP().getBusiYamlValue(self.path, "sql")
env = os.environ["ENV"]
if env == "on" or env == "pre":
database = value[schema][0]
sql = value[schema][1]
param = param
result = sqlByIdb().selectSql(database, sql, param, env)
else:
result = mySql().selectSql(host, port, user, pwd, value[schema][0], value[schema][1], param)
return result
def ddlSql(self, schema, param=[], db="bj_db"):
host = mySql().getConf(db)[0]
port = mySql().getConf(db)[1]
user = mySql().getConf(db)[2]
pwd = mySql().getConf(db)[3]
value = confOP().getYamlValue("sql")
if schema not in value:
value = confOP().getBusiYamlValue(self.path, "sql")
result = mySql().executeUpdate(host, port, user, pwd, value[schema][0], value[schema][1], param)
return result
class mySql:
def __init__(self):
pass
def getConf(self, db="bj_db"):
host = confOP().getConfValue(curPath + "/conf.ini", db, "host")
port = confOP().getConfValue(curPath + "/conf.ini", db, "port", "int")
user = confOP().getConfValue(curPath + "/conf.ini", db, "user")
pwd = confOP().getConfValue(curPath + "/conf.ini", db, "password")
return host,port,user,pwd
def connection(self, host, port, user, pwd, database):
return pymysql.connect(host=host, port=port,user=user,passwd=pwd,db=database)
def selectSql(self, host, port, user, pwd, database, sql, param=[]):
conn = self.connection(host, port, user, pwd, database)
cursor = conn.cursor()
try:
cursor.execute(sql, param)
data = cursor.fetchall()
cols = cursor.description
col = []
for i in cols:
col.append(i[0])
data = list(map(list, data))
return data
except Exception as e:
print(e)
conn.rollback()
cursor.close()
conn.close()
def executeUpdate(self, host, port, user, pwd, database, sql, param=[]):
conn = self.connection(host, port, user, pwd, database)
cursor = conn.cursor()
try:
ret = cursor.execute(sql, param)
conn.commit()
return ret
except Exception as e:
print(e)
conn.rollback()
cursor.close()
conn.close()
class mongodb:
def connection(self,db,collect):
ip = confOP().getConfValue(curPath + "/conf.ini", "mongo", "ip")
port = confOP().getConfValue(curPath + "/conf.ini", "mongo", "port")
path = "mongodb://" + ip + ":" + port + "/"
myclient = pymongo.MongoClient(path)
mydb = myclient[db]
mycol = mydb[collect]
return mycol
#查询所有的值
def findALl(self, db, collect):
result = []
mycol = self.connection(db, collect)
for x in mycol.find():
result.append(x)
return result
#按照条件查询:条件为{}类型
def findByCon(self, db, collect, condition):
result = []
mycol = self.connection(db, collect)
for x in mycol.find(condition):
result.append(x)
return result
if __name__ == '__main__':
env = 'sit'
os.environ['ENV'] = env.lower()
path = "D:\\myCode\\autotest-airtest-local\\data\\月嫂"
#mysql的例子
result = dbOP(path).selectSql("local_worker_info")
print(result[0])
#monggdb的例子
#mongodb().findByCon("yapi","user", {"role": "admin"})
#redis的例子
#redisClass().connect()
This diff is collapsed.
# -*- encoding=utf8 -*-
import base64
import requests
import json
from common.confop import confOP
class sqlByIdb:
# 登录
def login(self):
url = "http://docp.plt.babytree-inc.com/api/v1/passport/login/"
header = {
'Content-Type': 'application/json'
}
username = "dGVzdF9jbG91ZA=="
password = "eDZpbkRITnJVRWRl"
postdata = json.dumps({
"username": base64.b64decode(username.encode('utf-8')).decode("utf-8"),
"password": base64.b64decode(password.encode('utf-8')).decode("utf-8")
})
response = requests.request("POST", url, headers=header, data=postdata)
result = json.loads(response.text.encode('utf8'))
return result
def selectSql(self, database, sql, param, env):
login_result = sqlByIdb().login()
sql = sql.replace('%d', '%s')
for pa in param:
pa = "'" + str(pa) + "'"
sql = sql.replace('%s', pa, 1)
print(sql)
value = confOP().getYamlValue("idbSet")
if env == "on":
env = "live"
instance_id = value[database][env]
url = "http://docp.plt.babytree-inc.com/api/v1/sql/mysql/query/query/"
payload = json.dumps({
"instance_id": instance_id,
"db_name": database,
"tb_name": database,
"limit_num": 3000,
"sqlContent": sql
})
headers = {
'Authorization': login_result["sid"],
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
result = json.loads(response.text.encode('utf8'))
return result["results"][0]["rows"]
import time
import telnetlib
import re
class TelnetClient(object):
"""通过telnet连接dubbo服务, 执行shell命令, 可用来调用dubbo接口
"""
def __init__(self, server_host, server_post):
self.tn = telnetlib.Telnet()
self.server_host = server_host
self.server_port = server_post
# 此函数实现telnet登录主机
def connect_dubbo(self):
try:
print("telent连接dubbo服务端: telnet {} {} ……".format(self.server_host, self.server_port))
self.tn.open(self.server_host, port=self.server_port)
return True
except Exception as e:
print('连接失败, 原因是: {}'.format(str(e)))
return False
# 此函数实现执行传过来的命令,并输出其执行结果
def execute_some_command(self, command):
# 执行命令
cmd = (command + '\n').encode("gbk")
self.tn.write(cmd)
# 获取命令结果,字符串类型
retry_count = 0
# 如果响应未及时返回,则等待后重新读取,并记录重试次数
result = self.tn.read_very_eager().decode(encoding='gbk')
while result == '':
time.sleep(1)
result = self.tn.read_very_eager().decode(encoding='gbk')
retry_count += 1
return result
# 退出telnet
def logout_host(self):
self.tn.write(b"exit\n")
print("登出成功")
class InvokeDubboApi(object):
def __init__(self, server_host, server_post):
try:
self.telnet_client = TelnetClient(server_host, server_post)
self.login_flag = self.telnet_client.connect_dubbo()
except Exception as e:
print("invokedubboapi init error" + str(e))
def invoke_dubbo_api(self, dubbo_service, dubbor_method, args):
api_name = dubbo_service + "." + dubbor_method + "({})"
cmd = "invoke " + api_name.format(args)
# print("调用命令是:{}".format(cmd))
resp0 = None
try:
if self.login_flag:
resp0 = self.telnet_client.execute_some_command(cmd)
# print("接口响应是,resp={}".format(resp0))
# dubbo接口返回的数据中有 elapsed: 4 ms. 耗时,需要使用elapsed 进行切割
return str(re.compile(".+").findall(resp0).pop(0)).split("elapsed").pop(0).strip()
else:
print("登陆失败!")
except Exception as e:
raise Exception("调用接口异常, 接口响应是resp={}, 异常信息为:{}".format(resp0, str(e)))
self.logout()
def logout(self):
self.telnet_client.logout_host()
class GetDubboService2(object):
def __init__(self):
pass
def get_dubbo_info2(self,content):
try:
dubbore = re.compile(r"([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+)", re.I)
result = dubbore.search(str(content)).group()
print("获取到dubbo部署信息" + result)
return {"server_host": result.split(":")[0], "server_post": result.split(":")[1]}
except Exception as e:
raise Exception("获取dubbo部署信息失败:{}".format(str(e)))
import os
from ruamel import yaml
from common.db.db import dbOP
import datetime
curpath = os.path.dirname(os.path.realpath(__file__))
rootPath = os.path.split(curpath)[0]
# 数据读入和写入文件
class FileUtils(object):
def w_info(self, info,keyname):
module=info[2]
dict = {}
value = {}
value['username'] = info[0]
value['goodsname'] = info[1]
key=keyname
dict[key] = value
w_path=rootPath+os.sep+'data'+os.sep+module
# print(w_path)
yamlpath = os.path.join(w_path, "message")
# 写入到yaml文件
with open(yamlpath, "w", encoding="utf-8") as f:
yaml.dump(dict, f, Dumper=yaml.RoundTripDumper,allow_unicode=True)
def r_info(self, module,keyname):
w_path = rootPath + os.sep + 'data' + os.sep + module
yamlpath = os.path.join(w_path, "message")
file_value = open(yamlpath, 'r',encoding='utf-8')
result = yaml.load(file_value.read(), Loader=yaml.Loader)
if result is not None:
key = keyname
if key in result:
return result[key]
else:
return None
else:
return None
if __name__ == '__main__':
# info=("aaaa","bbbbbb","mdm3-pim")
# FileUtils().w_info(info,"产品新增")
aa=FileUtils().r_info("mdm3-pim","产品新增")
print(aa['username'])
loginusername1:
aaaa: aaaa
bbbbbb: bbbbbb
import hashlib
from Crypto.Cipher import AES
class PasswordEncrypt(object):
"""通过对密码进行加密,方便spd系统登录之后获取token
spd项目token不存于数据库中,token只存在于内存中
"""
def __init__(self, username, userpwd, verifyCodeId):
self.username = username # 用户名
self.userpwd = userpwd # 密码
self.verifyCodeId = verifyCodeId # 验证码id
# 此函数实现密码加密
def pwd_Encrypt(self):
'''
{"username":"gyqxadmin",
"passwd":"af5d87060df01ce434e4a397b51a0b9bd960416aa873177889f6a0104b28e450acc980ab8d6391931a8470a91c37c94fad5d14f4925d860fb3314aca9bc4677a3ade29e23fb469b8710680995f8e218f",
"verifyCodeId":"512cdfebc1a042fa89d0f5a56d744f4d","verifyCode":"ece6","projectCode":"warehouse.pc"}
'''
# verifyCodeId = b'512cdfebc1a042fa89d0f5a56d744f4d'
verifyCodeId = self.verifyCodeId
verifyCode = bytes(verifyCodeId[0:16])
# print("verifyCode:", verifyCode)
username_and_pwd = self.username + self.userpwd
sha256EncodeStr = hashlib.sha256(username_and_pwd.encode("utf-8"))
# print("sha256EncodeStr:", sha256EncodeStr.hexdigest())
# print("encode sha256EncodeStr:", sha256EncodeStr.hexdigest().encode("utf-8"))
aes = AES.new(key=bytes(verifyCodeId), iv=verifyCode, mode=AES.MODE_CBC)
en_text = aes.encrypt(self.pad(sha256EncodeStr.hexdigest()).encode("utf-8")) # 加密明文
# print("en_text:", en_text)
# print("base64 de_text2:", en_text.hex())
# print('en_text',en_text)
return en_text.hex()
def pad(slef, text):
# print(type(text))
text_length = len(text)
amount_to_pad = AES.block_size - (text_length % AES.block_size)
# print('amount_to_pad',amount_to_pad)
# print(type(amount_to_pad))
if amount_to_pad == 0:
amount_to_pad = AES.block_size
pad = chr(amount_to_pad)
# print('pad',pad)
# print(text+pad * amount_to_pad)
return text + pad * amount_to_pad
if __name__ == '__main__':
aa = PasswordEncrypt('1679886114521', 'a123456!', b'7382a248d0e94645ba8b5b0cd942370d')
print(aa.pwd_Encrypt())
This diff is collapsed.
import os
from ruamel import yaml
from common.db.db import dbOP
import datetime
curpath = os.path.dirname(os.path.realpath(__file__))
# 数据读入和写入文件
class Rw:
def w_token(self, enc_user_id='u779700044448', env='on'):
result = dbOP().selectSql('select_user_token', [enc_user_id], "meitun_db")
token = result[0][0]
dict = {}
token_value = {}
token_value["time"] = datetime.datetime.now()
token_value["token"] = token
token_value["enc_user_id"] = enc_user_id
key = enc_user_id + "_" + env
dict[key] = token_value
yamlpath = os.path.join(curpath, "data")
# 写入到yaml文件
with open(yamlpath, "w", encoding="utf-8") as f:
yaml.dump(dict, f, Dumper=yaml.RoundTripDumper)
return token
def w_info(self, info):
dict = {}
value = {}
value["loginusername"] = info[0]
value["goodsname"] = info[1]
key="loginusername1"
dict[key] = value
yamlpath = os.path.join(curpath, "data")
# 写入到yaml文件
with open(yamlpath, "w", encoding="utf-8") as f:
yaml.dump(dict, f, Dumper=yaml.RoundTripDumper,allow_unicode=True)
def r_token(self, enc_user_id='u779700044448', env='on'):
yamlpath = os.path.join(curpath, "data")
file_value = open(yamlpath, 'r')
result = yaml.load(file_value.read(), Loader=yaml.Loader)
if result is not None:
key = enc_user_id + "_" + env
if key in result:
return result[key]
else:
return None
else:
return None
def r_temp_file(self, key):
"""
读临时文件
:return:
"""
yamlPath = os.path.join(curpath, "temp.yaml")
file_value = open(yamlPath, 'r')
result = yaml.load(file_value.read(), Loader=yaml.Loader)
return result[key]
def w_temp_file(self, dict):
"""
写临时文件,没有会自动生成
:param content:
:return:
"""
yamlpath = os.path.join(curpath, "temp.yaml")
# 写入到yaml文件
with open(yamlpath, "w", encoding="utf-8") as f:
yaml.dump(dict, f, Dumper=yaml.RoundTripDumper)
from common.db.db import dbOP
import datetime
# 数据读入和写入文件
class timeUtils(object):
def get_time_hms(self):
'''2023-05-06 09:39:30'''
import time
t = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
return t
\ No newline at end of file
from common.passwordUtils import PasswordEncrypt
class TokenUtils(object):
def __init__(self, username, userpwd, verifyCodeId):
self.username = username # 用户名
self.userpwd = userpwd # 密码
self.verifyCodeId = verifyCodeId # 验证码id
def get_PasswordEncrypt(self):
#获取加密后的密码
return PasswordEncrypt(self.username,self.userpwd,bytes(self.verifyCodeId.encode())).pwd_Encrypt()
\ No newline at end of file
import base64
import json
import requests
class VerificationCodeOcr:
"""
1、用于识别数字二维码
2、本方法使用的是第三方识别接口(图鉴),因此需要账号和密码
3、通过验证码获取接口获取到验证码之后需保存到png文件,再使用此类进行识别
filename:文件
username:图鉴系统用户名
password:图鉴系统密码
"""
def __init__(self, filename, username, password):
self.filename = filename
self.username = username
self.password = password
def base64_api(self):
with open(self.filename, 'rb') as f:
base64_data = base64.b64encode(f.read())
b64 = base64_data.decode()
data = {"username": self.username, "password": self.password, "typeid": 1, "image": b64}
result = json.loads(requests.post(r"http://api.ttshitu.com/predict", json=data).text)
if result['success']:
return result["data"]["result"]
else:
return result["message"]
return ""
if __name__ == '__main__':
print(VerificationCodeOcr(r"air_case/cmdc_login/多彩商城登录.air/verifycode.png","rainbow123","rainbow123").base64_api())
from math import radians, cos, sin, asin, sqrt
from common.common_func import commonFuc
import json
class businessFuc(object):
def diff_years(self, source_year, target_year):
"""
计算两个日期之间相差的年数
:param target_year: 当前时间
:param source_year: 原始年日期
:return:
"""
years = int(target_year.strftime('%Y')) - int(str(source_year).split("-")[0])
return years
def geopy_distance(self, lng1, lat1, lng2, lat2):
"""
计算两个经纬度之间的距离
:return:
"""
lng1, lat1, lng2, lat2 = map(radians, [float(lng1), float(lat1), float(lng2), float(lat2)])
dlon = lng2 - lng1
dlat = lat2 - lat1
a = sin(dlat / 2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
distance = 2 * asin(sqrt(a)) * 6371 * 1000 # 地球平均半径,6371km
distance = round(distance / 1000, 3)
return distance
def get_globalsid(self):
login_url = commonFuc().get_business_data("", "login_url")
result = commonFuc().http_get(login_url)
return result["sid"]
# 快速下单下单权限判定接口url
"url": "/cms/public/isQuickOrderSign"
"companyId1": "2"
"companyId2": "57"
"payload": {
"companyId": "%s"
}
# 预期结果
checkDict1: {"success":true,"code":"200","message":null,"data":{"quickOrderSign":1},"freshToken":null}
checkDict2: {"success":true,"code":"200","message":null,"data":{"quickOrderSign":0},"freshToken":null}
# 数据库相关信息
"host": "39.106.228.69"
"port": "3306"
"user": "cmdc"
"pwd": "GHEyi.414"
"database": "cmdc-user"
"sql": "select t.companyId from `cmdc-user`.cmdc_user t where t.deleteSign = "0" and userName = "Test001";"
# 多彩商城登录信息
"username": "Test001"
"password": "Aa123456"
#后台运营管理系统登录信息
"username1": "admin2"
"password1": "Aa123456"
json_headers: {
"Content-Type": "application/json",
"Cmdc_access_token": "%s"
}
#商品列表接口地址
"url": "/product/mall/queryProductInfoByPage"
#购物车列表接口地址
"url1": "/product/mall/queryTotalBuyerCartList"
#测试场景:获取用户对应的购物车列表信息
json_headers1: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload1": {"productName":"","materialCode":"","manufacturer":"","licenseCode":"","timeSortStatus":0,"pageSize":100,"pageStart":1}
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK"}
#购物车新增商品接口地址
"url2": "/product/mall/addBuyerCart"
#测试场景:增加新的商品至购物车
json_headers2: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload2": {"currentCompanyId":2,"productId":111462,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict2: {"success":true,"code":"200","message":"OK","data":"ok"}
#测试场景:增加新的不存在的商品至购物车
json_headers4: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload4": {"currentCompanyId":2,"productId":1114654363453453532,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict4: {"success":false,"code":"1078","message":"该商品不存在,加入购物车失败","data":null,"freshToken":null}
#测试场景:增加已下架商品至购物车
json_headers5: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
#查询已下架商品列表请求报文
"payload50": {"isFbList":0,"filialeCode":null,"productName":null,"productCode":null,"specifications":null,"materialCode":null,"manufacturer":null,"lineName":null,"riskRank":null,"isRelease":null,"isExistImage":null,"jdeStatus":null,"isGift":null,"description":null,"tbsj":[],"pageNum":1,"pageSize":8,"total":28,"firstQuery":true,"flag":true,"preInvalidStatus":null,"isControlSales":null,"startTime":null,"endTime":null,"status":102}
#增加已下架商品至购物车报文
"payload5": {"currentCompanyId":%s,"productId":%s,"quantity":1,"agreementPriceId":%s,"price":%s}
#预期结果
checkDict5: {"success":false,"code":"1078","message":"该商品不存在,加入购物车失败","data":null,"freshToken":null}
#测试场景:增加已失效商品至购物车
json_headers6: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload6": {"currentCompanyId":2,"productId":1114654363453453532,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict6: {"success":false,"code":"1078","message":"该商品不存在,加入购物车失败","data":null,"freshToken":null}
#测试场景:增加控销商品至购物车
json_headers7: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload7": {"currentCompanyId":2,"productId":1114654363453453532,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict7: {"success":false,"code":"1078","message":"该商品不存在,加入购物车失败","data":null,"freshToken":null}
#测试场景:增加赠品至购物车
json_headers8: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload8": {"currentCompanyId":2,"productId":1114654363453453532,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict8: {"success":false,"code":"1078","message":"该商品不存在,加入购物车失败","data":null,"freshToken":null}
#测试场景:增加跨站点商品至购物车
json_headers9: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload9": {"currentCompanyId":2,"productId":1114654363453453532,"quantity":1,"agreementPriceId":0,"price":12,"filialeCode":"00102"}
#预期结果
checkDict9: {"success":false,"code":"1078","message":"该商品不存在,加入购物车失败","data":null,"freshToken":null}
#购物车商品删除接口地址
"url3": "/product/mall/removeBuyerCart"
#测试场景:从用户购物车列表删除已添加的商品
json_headers3: {
"Cmdc_access_token": "%s",
"Sourcetype": "mall"
}
"payload3": {"buyerCartIdList":["%s"]}
#预期结果
checkDict3: {"success":true,"code":"200","message":"OK","data":"ok"}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#需求单列表接口地址
"url": "/order/back/refuseDemand"
# 后台运营管理系统登录信息
"username": "admin2"
"password": "Aa123456"
json_headers1: {
"Content-Type": "application/json",
"Cmdc_access_token": "%s"
}
#测试场景一:需求正常单删除
"payload1": {"demandId":41472,"auditStatus":0,"auditRemark":"#待国药审核#"}
#预期结果
checkDict2: {"success":true,"code":"200","message":"OK","data":1,"freshToken":null}
#测试场景二:删除不存在的需求单
"payload2": {"demandId":41506345345,"auditStatus":1,"auditRemark":"#待国药审核#"}
#预期结果
"checkDict3": {"success":false,"code":"demand","message":"审核拒绝没有找到子需求单","data":null,"freshToken":null}
#测试场景三:重复删除已被删除的需求单
"payload3": {"demandId":11151,"auditStatus":2,"auditRemark":"#未首营平台取消#"}
#预期结果
"checkDict4": {"success":false,"code":"demand","message":"订单已拒绝,无法重复拒绝","data":null,"freshToken":null}
#需求单列表接口地址
"url": "/order/back/refuseDemand"
# 后台运营管理系统登录信息
"username": "admin2"
"password": "Aa123456"
json_headers1: {
"Content-Type": "application/json",
"Cmdc_access_token": "%s"
}
#测试场景一:需求正常单审核拒绝
"payload1": {"demandId":41512,"auditStatus":2,"auditRemark":"审核拒绝原因"}
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK","data":1,"freshToken":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjIsInVzZXJOYW1lIjoiYWRtaW4yIiwidGltZSI6MTY5NDM5NDA0NjA3N30.JQgyXjLa5rH9XKIebln5rpPG4aasKNmVJbWA9UYu7PU"}
#测试场景二:重复拒绝同一个需求单
"payload2": {"demandId":41512,"auditStatus":2,"auditRemark":"审核拒绝原因"}
#预期结果
"checkDict2": {"success":false,"code":"demand","message":"订单已拒绝,无法重复拒绝","data":null,"freshToken":null}
#测试场景三:审核拒绝不存在的需求单
"payload3": {"demandId":111513453535,"auditStatus":2,"auditRemark":"#未首营平台取消#"}
#预期结果
"checkDict3": {"success":false,"code":"demand","message":"审核拒绝没有找到子需求单","data":null,"freshToken":null}
#测试场景四:审核拒绝其他状态下的需求单,例如,审核通过的需求单
"payload4": {"demandId":41512,"auditStatus":2,"auditRemark":"审核拒绝原因"}
#预期结果
"checkDict4": {"success":true,"code":"200","message":"OK","data":1,"freshToken":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOjIsInVzZXJOYW1lIjoiYWRtaW4yIiwidGltZSI6MTY5NDM5NDA0NjA3N30.JQgyXjLa5rH9XKIebln5rpPG4aasKNmVJbWA9UYu7PU"}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment