Commit 3763244c authored by 周念东's avatar 周念东
Browse files

缺货篮管理更新

parent b4190252
...@@ -14,7 +14,7 @@ import json ...@@ -14,7 +14,7 @@ import json
module = "cmdc_product_stockoutbasket" module = "cmdc_product_stockoutbasket"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url3") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url1")
print(url) print(url)
# 获取登录所需账号密码 # 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username")
...@@ -22,7 +22,7 @@ password = commonFuc().get_business_data(module, "password") ...@@ -22,7 +22,7 @@ password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token() cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload3") request_body = commonFuc().get_business_data(module, "payload1")
""" """
场景:缺货篮管理(缺货篮管理) 场景:缺货篮管理(缺货篮管理)
...@@ -34,7 +34,7 @@ result = requests.post(url, json=request_body, headers=headers) ...@@ -34,7 +34,7 @@ result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content) result = json.loads(result.content)
# print(result) # print(result)
# 获取预期结果 # 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict3") check_dict = commonFuc().get_business_data(module, "checkDict1")
print(check_dict) print(check_dict)
# 断言实际结果中是否包含预期结果的内容 # 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result) commonFuc().check_result(check_dict, result)
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc缺货篮管理查询公司选项,2293,2293-1,sit,bs
主数据平台:运营后台管理系统缺货篮管理接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_product_stockoutbasket"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url2")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload2")
"""
场景:缺货篮管理(缺货篮管理)
用例名称:缺货篮管理查询公司选项(缺货篮管理)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.get(url, json=request_body, headers=headers)
result = json.loads(result.content)
# print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict2")
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
\ No newline at end of file
# -*- encoding=utf8 -*-
__author__ = "zhouniandong"
"""
case_tag:cmdc_api,cmdc缺货篮管理选择已发布产品类别选项,2293,2293-1,sit,bs
主数据平台:运营后台管理系统缺货篮管理接口
"""
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests
import json
module = "cmdc_product_stockoutbasket"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url3")
print(url)
# 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
request_body = commonFuc().get_business_data(module, "payload3")
"""
场景:缺货篮管理(缺货篮管理)
用例名称:缺货篮管理选择已发布产品类别选项(缺货篮管理)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content)
# print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict3")
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
\ No newline at end of file
...@@ -7,21 +7,21 @@ json_headers: { ...@@ -7,21 +7,21 @@ json_headers: {
} }
#查询公司配置信息接口地址 #缺货篮管理
"url1": "/user/queryCompanyOptions" "url1": "/user/queryStockOutPage"
"payload1": {} "payload1": {"telephone":"","status":null,"firstCategory":"","secondCategory":"","thirdCategory":"","pageStart":1,"pageSize":10}
#预期结果 #预期结果
checkDict1: {"success":true,"code":"200","message":"OK"} checkDict1: {"success":true,"code":"200","message":"OK"}
#获取选择已发布商品分类选项接口地址 #缺货篮管理查询公司选项
"url2": "/product/mall/selectPublishedProductCategoryOption" "url2": "/user/queryCompanyOptions"
"payload2": {"disableSign":0,"status":3,"telephone":"","userNo":"","userName":"","customerCompanyName":"","pageSize":10,"pageStart":1,"total":0} "payload2":
#预期结果 #预期结果
checkDict2: {"success":true,"code":"200","message":"OK"} checkDict2: {"success":true,"code":"200","message":"OK"}
#获取查询缺货篮接口地址 #获取查询缺货篮接口地址
"url3": "/user/queryStockOutPage" "url3": "/product/mall/selectPublishedProductCategoryOption"
"payload3": {"telephone":"","status":null,"firstCategory":"","secondCategory":"","thirdCategory":"","pageStart":1,"pageSize":10} "payload3": {"parentId":1}
#预期结果 #预期结果
checkDict3: {"success":true,"code":"200","message":"OK"} checkDict3: {"success":true,"code":"200","message":"OK"}
\ No newline at end of file
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