Commit 75f3fc35 authored by zhanhuasheng's avatar zhanhuasheng

bugfix

parent e4895f41
...@@ -5,3 +5,4 @@ class buyPlanData(Global): ...@@ -5,3 +5,4 @@ class buyPlanData(Global):
numItem = [1,2,10] #有额度限制的服务 numItem = [1,2,10] #有额度限制的服务
today = str(datetime.datetime.now().date()) today = str(datetime.datetime.now().date())
next_month = str(datetime.date.today() + datetime.timedelta(days=30)) next_month = str(datetime.date.today() + datetime.timedelta(days=30))
ProPlanId = 12
\ No newline at end of file
...@@ -75,28 +75,21 @@ api8: ...@@ -75,28 +75,21 @@ api8:
- eq: {"$.code": 0} - eq: {"$.code": 0}
- exec: {"code": "assert res.json()['data']['total'] == str(int('${url_num}') + 1)"} - exec: {"code": "assert res.json()['data']['total'] == str(int('${url_num}') + 1)"}
api9:
title: 编辑url
url: api/v1/willai/local/editAiUrl
method: post
data: {"shopId":"${shopId}","url":"${edit_url}","id":"${url_id}","v":"${v}"}
expected:
- eq: {"$.code": 0}
api10: api10:
title: 查询url接口 title: 查询url接口
url: api/v1/willai/local/aiUrlList url: api/v1/willai/local/aiUrlList
method: post method: post
data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 1} data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 1,"search": "","sortType": 0}
expected: expected:
- eq: {"$.code": 0} - eq: {"$.code": 0}
- eq: {"$.data.list[?(@.id == '${url_id}')].url": "${edit_url}"} - eq: {"$.data.list[?(@.id == '${url_id}')].url": "${edit_url}"}
api11: api11:
title: 刷新url title: 刷新url
url: api/v1/willai/local/reloadAiUrl url: api/v1/willai/local/operateAiUrl
method: post method: post
data: {"shopId":"${shopId}","id":["${url_id}"],"v":"${v}"} data: {"shopId":"${shopId}","idList":["${url_id}"],"v":"${v}","selectAll": false,"status": 1,"excludeIdList": []}
expected: expected:
- eq: {"$.code": 0} - eq: {"$.code": 0}
...@@ -104,7 +97,7 @@ api12: ...@@ -104,7 +97,7 @@ api12:
title: 删除url title: 删除url
url: api/v1/willai/local/deleteAiUrl url: api/v1/willai/local/deleteAiUrl
method: post method: post
data: {"shopId":"${shopId}","id":["${url_id}"],"v":"${v}"} data: {"shopId":"${shopId}","idList":["${url_id}"],"v":"${v}","selectAll": false,"status": 2,"excludeIdList": []}
expected: expected:
- eq: {"$.code": 0} - eq: {"$.code": 0}
...@@ -112,7 +105,7 @@ api13: ...@@ -112,7 +105,7 @@ api13:
title: 查询url接口 title: 查询url接口
url: api/v1/willai/local/aiUrlList url: api/v1/willai/local/aiUrlList
method: post method: post
data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 1} data: {"page":1,"pageSize":100,"shopId":"${shopId}","v":"${v}","category": 1,"sortType": 0}
expected: expected:
- eq: {"$.code": 0} - eq: {"$.code": 0}
- not_in_list: {"$.data.list[*].id": "${url_id}"} - not_in_list: {"$.data.list[*].id": "${url_id}"}
......
...@@ -2,7 +2,7 @@ api1: ...@@ -2,7 +2,7 @@ api1:
title: 查询当前月度套餐种类 title: 查询当前月度套餐种类
url: /api/v1/businessPlan/getBasicPlan?planType=1&v=${v} url: /api/v1/businessPlan/getBasicPlan?planType=1&v=${v}
method: get method: get
set_value: {"ProPlanId" : "$.data.basicPlanList[?(@.name == 'Pro')].id" , "FreePlanId" : "$.data.basicPlanList[?(@.name == 'Free')].id"} set_value: {"FreePlanId" : "$.data.basicPlanList[?(@.name == 'Free')].id"}
expected: expected:
- eq: {"$.code": 0} - eq: {"$.code": 0}
......
import pytest import pytest
from Utils.webhook_handler import webhook
from Utils.sql_handler import test_env_conn from Utils.sql_handler import test_env_conn
if __name__ == '__main__': if __name__ == '__main__':
try: try:
# pytest.main(['-vs',r'C:\Users\rd71\PycharmProjects\willdesk_api_auto\TestCase\inbox\test_06_channel.py',f'--alluredir=./allureReports/json','--clean-alluredir']) # pytest.main(['-vs',r'C:\Users\rd71\PycharmProjects\willdesk_api_auto\TestCase\inbox\test_06_channel.py',f'--alluredir=./allureReports/json','--clean-alluredir'])
pytest.main(['-vs','./TestCase',f'--html=./report.html']) #allure报告一直生成不了,改用pytest自带报告 pytest.main(['-vs','TestCase/billing',f'--html=./report.html']) #allure报告一直生成不了,改用pytest自带报告
finally: finally:
test_env_conn.close_db() #关闭数据库链接 test_env_conn.close_db() #关闭数据库链接
......
Markdown is supported
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