Commit 3c958359 authored by 张伟男's avatar 张伟男

Merge branch 'common_dev' into zwn_dev

parents 403e1677 e2d25680
No preview for this file type
......@@ -7,6 +7,7 @@ class feed_request(BaseRequest):
self.data = self.api_load(path_setting.FEED_INDEXV9_CONFIG)
self.data = self.api_load(path_setting.CONFIG_LIST_CONFIG)
self.data = self.api_load(path_setting.COMMUNITY_CONFIG)
self.data = self.api_load(path_setting.FREE_RECRUIT_BANNER_CONFIG)
def index_v9(self,tabtype,version,current_city_id):
......@@ -31,12 +32,32 @@ class feed_request(BaseRequest):
return self.api_send(self.data["community"])
# 免费招募列表的背景图片
def free_recruit_banner(self, version, json):
self.params["version"] = version
self.params["json"] = json
return self.api_send(self.data["free_recruit_banner"])
# 免费招募列表
def free_recruit_list(self, version, json, tab_type, page, size):
self.params["version"] = version
self.params["json"] = json
self.params["tab_type"] = tab_type
self.params["page"] = page
self.params["size"] = size
return self.api_send(self.data["free_recruit_list"])
if __name__ == '__main__':
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
#社区tab页签到和招募活动列表
print(feed_request().config_list())
print(feed_request().config_list("7.44.0"))
#社区tab页签到和招募活动列表
print(feed_request().community())
\ No newline at end of file
#免费招募列表背景图片
print(feed_request().free_recruit_banner("7.44.1", " "))
# 免费招募列表
print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
\ No newline at end of file
......@@ -30,4 +30,29 @@ community:
tab_id: 0
data:
json: {}
isLogin: 1
#招募活动列表背景图片
free_recruit_banner:
method: get
url: /api/feed/free_recruit/free_recruit_banner
params:
version: ${version}
json: ${json}
data:
json: { }
isLogin: 1
#招募活动列表
free_recruit_list:
method: get
url: /api/feed/free_recruit/list
params:
version: ${version}
json: ${json}
tab_type: ${tab_type}
page: ${page}
size: ${size}
data:
json: { }
isLogin: 1
\ No newline at end of file
......@@ -19,6 +19,9 @@ class janus_request(BaseRequest):
#医生医院sug列表
self.data = self.api_load(path_setting.KEYWORDTIP_CONFIG)
#次卡商详页
self.data = self.api_load(path_setting.BEAUTY_CARD_DETAIL_CONFIG)
#搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词
......@@ -94,7 +97,6 @@ class janus_request(BaseRequest):
# 品类聚合页面标签和专场
def polymer(self, version, category_polymer_id, device_id):
print("fgx")
self.params['version'] = version
self.params['category_polymer_id'] = category_polymer_id
self.params['device_id'] = device_id
......@@ -186,7 +188,62 @@ class janus_request(BaseRequest):
return self.api_send(self.data['beauty_card_order_detail'])
# 次卡商详页
def beauty_card_detail(self, spu_id, sku_id, welfareId, version, current_city_id, lat, lng ):
self.params['spu_id'] = spu_id
self.params['sku_id'] = sku_id
self.params['welfareId'] = welfareId
self.params['version'] = version
self.params['current_city_id'] = current_city_id
self.params['lat'] = lat
self.params['lng'] = lng
return self.api_send(self.data["beauty_card_detail"])
# 次卡商详-适应机构列表
def service_hospital(self, offset, sku_id, size, version, current_city_id, lat, lng):
self.params['offset'] = offset
self.params['sku_id'] = sku_id
self.params['size'] = size
self.params['version'] = version
self.params['current_city_id'] = current_city_id
self.params['lat'] = lat
self.params['lng'] = lng
return self.api_send(self.data["service_hospital"])
if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回
print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回
print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#打印商祥页-sku信息接口返回
print(janus_request().sku_info("5857263", "618788"))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print(janus_request().product_coupon_my_list(0, 0))
#品类聚合页面商品列表接口返回
print(janus_request().tag_service())
print("fgx")
#品类聚合页面标签和专场
print(janus_request().polymer())
print("fgx")
#打印次卡-确认订单接口返回
print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0))
#打印次卡-确认订单页面-修改手机号接口返回
print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430"))
#打印次卡-提交订单接口返回
print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0))
#打印次卡-支付平台接口返回
print(janus_request().beauty_card_payment_method("101670448736595"))
print(janus_request().product_my_list(0, 0))
# 次卡商详页-适应机构
print(janus_request().beauty_card_detail("100018", "10046", "100018", "7.44.0", "beijing", "40.001879", "116.487194"))
# 次卡商详页
print(janus_request().service_hospital("0", "10046", "1", "7.44.0", "beijing", "40.001879", "116.487194"))
# #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回
......
......@@ -132,6 +132,37 @@ beauty_card_update_phone:
vfc_code: ${vfc_code}
json: {}
isLogin: 1
#次卡商详页
beauty_card_detail:
method: GET
url: /api/janus/beauty_card/detail
params:
spu_id: ${spu_id}
sku_id: ${sku_id}
welfareId: ${welfareId}
version: ${version}
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: { }
json: { }
#次卡商详页-适应机构列表
service_hospital:
method: GET
url: /api/janus/beauty_card/service_hospital
params:
offset: ${offset}
sku_id: ${sku_id}
size: ${size}
version: ${version}
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: { }
json: { }
#次卡-提交订单
beauty_card_order_submit:
......
......@@ -8,7 +8,7 @@ class user_request(BaseRequest):
self.data = self.api_load(path_setting.PERSONAL_CENTER_CONFIG)
def personal_center(self):
print("fgx")
return self.api_send(self.data["personal_center"])
......@@ -37,7 +37,7 @@ class user_request(BaseRequest):
if __name__ == '__main__':
#个人中心
print(user_request().personal_center())
print("fgx")
#打印医生/医院主页问答列表接口返回
print(user_request().answer("21476198"))
......
......@@ -45,6 +45,10 @@ class web2_request(BaseRequest):
self.params["page"] = page
return self.api_send(self.SERVICE_URL["service_deletelist"])
def artemis_ad_add_shopping_cart_info(self):
#我的购物车
return self.api_send(self.SERVICE_URL["artemis_ad_add_shopping_cart_info"])
......@@ -55,4 +59,5 @@ if __name__ == '__main__':
print(web2_request().tag_all())
print(web2_request().service_delete("1","209863","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web2_request().service_deletelist("1"))#商品回收站
print(web2_request().artemis_ad_add_shopping_cart_info())
......@@ -66,3 +66,11 @@ service_deletelist:
data: {}
json: {}
isLogin: 1
artemis_ad_add_shopping_cart_info:
method: get
url: /api/web2/artemis/ad/add_shopping_cart/info
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
......@@ -61,6 +61,14 @@ class web_request(BaseRequest):
# self.params["size"] = size
# self.params["file"] = file
# return self.api_send(self.ACCOUNT_URL["file_upload"])
def cpc_homepage(self):
return self.api_send(self.ACCOUNT_URL["cpc_homepage"])
def artemis_ad_type_list(self):
return self.api_send(self.ACCOUNT_URL["artemis_ad_type_list"])
def artemis_order_list(self,status):
self.params["status"] = status
return self.api_send(self.ACCOUNT_URL["artemis_order_list"])
......@@ -77,4 +85,10 @@ if __name__ == '__main__':
print(web_request().conversation_coupon(602329))
print(web_request().service_all())
# print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
print(web_request().conversation_user_id(0, "您好", 602329, "271caac2ae1687ca0a56ee18115b8183", "NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"))
\ No newline at end of file
print(web_request().conversation_user_id(0, "您好", 602329, "271caac2ae1687ca0a56ee18115b8183", "NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"))
print(web_request().cpc_homepage())
print(web_request().artemis_ad_type_list())
print("发送")
print(web_request().artemis_order_list(0))
print(web_request().artemis_order_list(1))
print(web_request().artemis_order_list(2))
\ No newline at end of file
......@@ -119,4 +119,29 @@ conversation_user_id:
t: ${t}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1 #需要登录
cpc_homepage:
method: get
url: /api/web/cpc/homepage
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
artemis_ad_type_list:
method: get
url: /api/web/artemis/ad/type_list
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
artemis_order_list:
method: get
url: /api/web/artemis/order/list
params:
status: ${status}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
import path_setting
from in_common.base_request import BaseRequest
class beautycard_request(BaseRequest):
def __init__(self):
#更美次卡-获取已添加页面次卡spu/sku列表
self.data = self.api_load(path_setting.GET_RELATED_BC_CONFIG)
# 更美次卡-删除/批量删除已添加页面次卡
self.data = self.api_load(path_setting.DELETE_RELATED_BC_CONFIG)
#更美次卡-获取已添加页面次卡spu/sku列表
def get_related_bc(self, unit_id, bc_sku_id, bc_spu_id, page, page_size):
self.params["unit_id"] = unit_id
self.params["bc_sku_id"] = bc_sku_id
self.params["bc_spu_id"] = bc_spu_id
self.params["page"] = page
self.params["page_size"] = page_size
return self.api_send(self.data["get_related_bc"])
#更美次卡-删除/批量删除已添加页面次卡
def delete_related_bc(self, unit_id, bc_sku_ids, bc_spu_ids, related_type):
self.params["unit_id"] = unit_id
self.params["bc_sku_ids"] = bc_sku_ids
self.params["bc_spu_ids"] = bc_spu_ids
self.params["related_type"] = related_type
return self.api_send(self.data["delete_related_bc"])
if __name__ == '__main__':
print(beautycard_request().get_related_bc("20105", "", "", "0", "10"))
print(beautycard_request().delete_related_bc("19931", "[10163]", "[]", "8"))
\ No newline at end of file
#更美次卡-获取已添加页面次卡spu/sku列表
get_related_bc:
method : GET
url : /achelous/visual/beauty_card/get_related_bc
params :
unit_id : ${unit_id}
bc_sku_id : ${bc_sku_id}
bc_spu_id : ${bc_spu_id}
page : ${page}
page_size : ${page_size}
data : {}
json : {}
isLogin : 1
#更美次卡-删除/批量删除已添加页面次卡
delete_related_bc:
method : POST
url : /achelous/visual/beauty_card/delete_related_bc
params : {}
data :
unit_id : ${unit_id}
bc_sku_ids : ${bc_sku_ids}
bc_spu_ids : ${bc_spu_ids}
related_type : ${related_type}
json : {}
isLogin : 1
\ No newline at end of file
......@@ -8,7 +8,7 @@ class login_request(BaseRequest):
self.data = self.api_load(path_setting.OMLOGIN_CONFIG)
#om后台-登录
def om_login(self, username, password, Cookie='session_key=b3owiduporwyatpueme46orsofkfgwjv'):
def om_login(self, username, password):
self.params["username"] = username
self.params["password"] = password
......
develop_host:
backend: http://backend.paas-develop.env
om: http://om.paas-develop.env
# backend: http://backend.paas-develop.env
# om: http://om.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
......@@ -286,7 +286,6 @@ PUSH_LIVE_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_dat
#商祥页-详情
JANUS_PRODUCT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "product_detail.yaml")
#商祥页-sku信息
......@@ -399,6 +398,14 @@ CONVERSATIONCOUPON=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_dat
#医生后台-发送私信
CONVERSATIONUSERID=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "conversation_user_id.yaml")
#医生后台-服务资源
ADTYPELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_ad_type_list.yaml")
#医生后台-我的购物车
ADADDSHOPPINGCARTINFO=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_ad_add_shopping_cart_info.yaml")
#医生后台-我的服务订单
ORDERLIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_order_list.yaml")
#医生后台-点点通商品-概览
CPCHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_homepage.yaml")
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.yaml")
......@@ -445,6 +452,30 @@ SETTLEMENTDELETE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/settle
OMLOGIN_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "login_request.yaml")
OMLOGIN = os.path.join(BASE_DIR, "backend_auto/test_om_data/om_login_data", "om_login.yaml")
#更美次卡-获取已添加页面次卡spu/sku列表
GET_RELATED_BC_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "beautycard_request.yaml")
GET_RELATED_BC = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_data", "get_related_bc.yaml")
#更美次卡-删除/批量删除已添加页面次卡
DELETE_RELATED_BC_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "beautycard_request.yaml")
DELETE_RELATED_BC = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_data", "delete_related_bc.yaml")
#次卡商详页
BEAUTY_CARD_DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
BEAUTY_CARD_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_detail.yaml")
#次卡商详页-适应机构列表
SERVICE_HOSPITAL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
SERVICE_HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "service_hospital.yaml")
#免费招募背景图片
FREE_RECRUIT_BANNER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_BANNER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_banner.yaml")
#免费招募活动列表
FREE_RECRUIT_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_list.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.feed_request import feed_request
class TestFreeRecruitBanner:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_BANNER)
free_recruit_banner_case, free_recruit_banner_data = get_ids(data, "free_recruit_banner")
@pytest.mark.parametrize("param", free_recruit_banner_data, ids=free_recruit_banner_case)
def test_free_recruit_case(self, param):
r = feed_request().free_recruit_banner(param["version"], param["json"])
if r["error"] == 0:
assert r["data"]["banner"] != param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.feed_request import feed_request
class TestFreeRecruitList:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_LIST)
free_recruit_list_case, free_recruit_list_data = get_ids(data, "free_recruit_list")
@pytest.mark.parametrize("param", free_recruit_list_data, ids=free_recruit_list_case)
def test_free_recruit_list(self, param):
r = feed_request().free_recruit_list(param["version"], param["json"], param["tab_type"], param["page"],param["size"])
if r["error"] == 0:
assert r["data"]["free_recruits"] != param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_request import janus_request
class TestBeautyCardDetail:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_DETAIL)
beauty_card_detail_case, beauty_card_detail_data = get_ids(data, "beauty_card_detail")
@pytest.mark.parametrize("param", beauty_card_detail_data, ids=beauty_card_detail_case)
def test_beauty_card_detail(self, param):
r = janus_request().beauty_card_detail(param["spu_id"], param["sku_id"], param["welfareId"], param["version"], param["current_city_id"], param["lat"], param["lng"])
if r["error"] == 0:
assert len(r["data"]["beautycart_list"]) > param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_request import janus_request
class TestServiceHospital:
data = BaseRequest().api_load(path_setting.SERVICE_HOSPITAL)
service_hospital_case, service_hospital_data = get_ids(data, "service_hospital")
@pytest.mark.parametrize("param", service_hospital_data, ids=service_hospital_case)
def test_service_hospital(self, param):
r = janus_request().service_hospital(param["offset"], param["sku_id"], param["size"], param["version"], param["current_city_id"], param["lat"], param["lng"])
if r["error"] == 0:
assert len(r["data"]["service_hospital_list"]) > param["assert"]
free_recruit_banner:
#社区免费招募活动列表背景图片
-
case: "免费招募活动列表背景图片"
version: "7.44.0"
assert: null
json: ""
free_recruit_list:
#社区招募活动列表
-
case: "免费招募活动列表"
version: "7.44.0"
assert: null
json: ""
tab_type: 1
page: 1
size: 10
beauty_card_detail:
#次卡商详页
-
case: "次卡商详页spuid=100018"
assert: 0
spu_id: 100018
sku_id: 10046
welfareId: 100018
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
-
case: "次卡商详页spuid=100021"
assert: 0
spu_id: 100021
sku_id: 10159
welfareId: 100021
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
service_hospital:
#次卡商详页-适用机构列表
-
case: "次卡适用机构列表spuid=100018"
assert: 0
offset: 0
sku_id: 10046
size: 1
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
......@@ -2,7 +2,7 @@ reply_create:
- assert1: null
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-06-15 17:03:51
content: ces测试+2021-06-16 16:08:57
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web2_request import web2_request
class TestArtemisAdAddShoppingCartInfo:
data = BaseRequest().api_load(path_setting.ADADDSHOPPINGCARTINFO)
adaddshoppingcartinfo_case, adaddshoppingcartinfo_data = get_ids(data, "artemis_ad_add_shopping_cart_info")
@pytest.mark.parametrize("param",adaddshoppingcartinfo_data,ids=adaddshoppingcartinfo_case)
def test_artemis_ad_add_shopping_cart_info(self, param):
'''我的购物车列表'''
r = web2_request().artemis_ad_add_shopping_cart_info()
if r["error"] == 0:
data = r.get("data").get("data", [])
assert len(data) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestArtemisAdTypeList:
data = BaseRequest().api_load(path_setting.ADTYPELIST)
adtypelist_case, adtypelist_data = get_ids(data, "artemis_ad_type_list")
@pytest.mark.parametrize("param",adtypelist_data,ids=adtypelist_case)
def test_artemis_ad_type_list(self, param):
'''服务资源列表'''
r = web_request().artemis_ad_type_list()
if r["error"] == 0:
adtypes = r.get("data").get("adtypes", [])
assert len(adtypes) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestArtemisOrderList:
data = BaseRequest().api_load(path_setting.ORDERLIST)
orderlist_case, orderlist_data = get_ids(data, "artemis_order_list")
@pytest.mark.parametrize("param",orderlist_data,ids=orderlist_case)
def test_artemis_order_list(self, param):
'''我的服务订单'''
r = web_request().artemis_order_list(param["status"])
if r["error"] == 0:
orders = r.get("data").get("orders", [])
assert len(orders) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestCpcHomepage:
data = BaseRequest().api_load(path_setting.CPCHOMEPAGE)
cpchomepage_case, cpchomepage_data = get_ids(data, "cpc_homepage")
@pytest.mark.parametrize("param",cpchomepage_data,ids=cpchomepage_case)
def test_cpc_homepage(self, param):
'''点点通-概览'''
r = web_request().cpc_homepage()
if r["error"] == 0:
if r["data"]["account"] <= "0":
assert r["data"]["is_cpc"] == param["assert"]
else:
assert r["data"]["is_cpc"] == param["assert1"]
artemis_ad_add_shopping_cart_info:
#我的购物车case
-
case: "我的购物车"
assert: 0
artemis_ad_type_list:
#服务资源case
-
case: "服务资源"
assert: 0
assert_account: 0
assert1: True
artemis_order_list:
#我的服务订单case
-
case: "我的服务订单请求失败case"
status: ""
assert: 0
-
case: "我的服务订单-待支付广告包case"
status: 0
assert: 0
-
case: "我的服务订单-已购买case"
status: 1
assert: 0
-
case: "我的服务订单-待审核case"
status: 2
assert: 0
-
case: "我的服务订单-待上线case"
status: 3
assert: 0
-
case: "我的服务订单-上线中case"
status: 4
assert: 0
-
case: "我的服务订单-已下线case"
status: 5
assert: 0
-
case: "我的服务订单-已支付广告包case"
status: 6
assert: 0
-
case: "我的服务订单-已关闭广告包case"
status: 7
assert: 0
cpc_homepage:
#点点通商品-概览case
-
case: "点点通商品概览"
#doctor_user_id: "602329"
assert: False
assert_account: 0
assert1: True
import pytest
import path_setting
from all_om_api.beautycard_request import beautycard_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#更美次卡-删除/批量删除已添加页面次卡
class TestDeleteRelatedBc:
data = BaseRequest().api_load(path_setting.DELETE_RELATED_BC)
delete_related_bc_case, delete_related_bc_data = get_ids(data, "delete_related_bc")
@pytest.mark.parametrize("param",delete_related_bc_data,ids=delete_related_bc_case)
def test_delete_related_bc(self,param):
r = beautycard_request().delete_related_bc(param["unit_id"], param["bc_sku_ids"], param["bc_spu_ids"], param["related_type"])
if r["code"] == 0:
print("成功删除已添加页面次卡")
assert r["data"] == param["assert"]
if r["code"] == 1:
print("未删除已添加页面次卡")
\ No newline at end of file
import pytest
import path_setting
from all_om_api.beautycard_request import beautycard_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
#更美次卡-获取已添加页面次卡spu/sku列表
class TestGetRelatedBc:
data = BaseRequest().api_load(path_setting.GET_RELATED_BC)
get_related_bc_case, get_related_bc_data = get_ids(data, "get_related_bc")
@pytest.mark.parametrize("param",get_related_bc_data,ids=get_related_bc_case)
def test_get_related_bc(self,param):
r = beautycard_request().get_related_bc(param["unit_id"], param["bc_sku_id"], param["bc_spu_id"], param["page"], param["page_size"])
if r["data"]:
print("成功获取已添加页面次卡spu/sku列表")
assert len(r["data"]["beauty_cards"]) != param["assert"]
if not r["data"]:
print("未获取到已添加页面次卡spu/sku列表")
\ No newline at end of file
#更美次卡-删除/批量删除已添加页面次卡
delete_related_bc:
#按SPU导入-已添加页面删除单条数据
-
case : "按SPU导入-已添加页面删除单条数据"
unit_id : "19896"
bc_sku_ids : "[]"
bc_spu_ids : "[28]"
related_type : "7"
assert: 1
#按SPU导入-已添加页面删除多条数据
-
case : "按SPU导入-已添加页面删除多条数据"
unit_id : "19896"
bc_sku_ids : "[]"
bc_spu_ids : "[30,31,33]"
related_type : "7"
assert: 3
#按SKU导入-已添加页面删除单条数据
-
case : "按SKU导入-已添加页面删除单条数据"
unit_id : "19933"
bc_sku_ids : "[10144]"
bc_spu_ids : "[]"
related_type : "8"
assert: 1
#按SKU导入-已添加页面删除多条数据
-
case : "按SKU导入-已添加页面删除多条数据"
unit_id : "19933"
bc_sku_ids : "[10141,10142]"
bc_spu_ids : "[]"
related_type : "8"
assert: 2
\ No newline at end of file
#更美次卡-获取已添加页面次卡spu/sku列表
get_related_bc:
#按SPU导入-根据专题id获取已添加页面次卡spu列表
-
case : "按SPU导入-根据专题id获取已添加页面次卡spu列表"
unit_id : "20105"
bc_sku_id : ""
bc_spu_id : ""
page : "0"
page_size : "10"
assert: 0
#按SPU导入-根据专题和次卡spu_id获取已添加页面次卡spu列表
-
case : "按SPU导入-根据专题和次卡spu_id获取已添加页面次卡spu列表"
unit_id : "20105"
bc_sku_id : ""
bc_spu_id : "100023"
page : "0"
page_size : "10"
assert: 0
#按SKU导入-根据专题id获取已添加页面次卡spu列表
-
case : "按SKU导入-根据专题id获取已添加页面次卡spu列表"
unit_id : "20106"
bc_sku_id : ""
bc_spu_id : ""
page : "0"
page_size : "10"
assert: 0
#按SKU导入-根据专题和次卡spu_id获取已添加页面次卡spu列表
-
case : "按SKU导入-根据专题和次卡spu_id获取已添加页面次卡spu列表"
unit_id : "20106"
bc_sku_id : ""
bc_spu_id : "100023"
page : "0"
page_size : "10"
assert: 0
#按SKU导入-根据专题和次卡sku_id获取已添加页面次卡spu和sku列表
-
case : "按SKU导入-根据专题和次卡sku_id获取已添加页面次卡spu和sku列表"
unit_id : "20106"
bc_sku_id : "10066"
bc_spu_id : ""
page : "0"
page_size : "10"
assert: 0
#按SKU导入-根据专题和次卡spu_id、sku_id获取已添加页面次卡spu和sku列表
-
case : "按SKU导入-根据专题和次卡spu_id、sku_id获取已添加页面次卡spu和sku列表"
unit_id : "20106"
bc_sku_id : "10066"
bc_spu_id : "100023"
page : "0"
page_size : "10"
assert: 0
#按SPU导入-录入错误的spu_id,点击查询
-
case : "录入错误的spu_id,点击查询"
unit_id : "20105"
bc_sku_id : ""
bc_spu_id : "1111111111111"
page : "0"
page_size : "10"
assert: 0
#按SKU导入-录入错误的sku_id,点击查询
-
case : "录入错误的sku_id,点击查询"
unit_id : "20106"
bc_sku_id : "111111111111"
bc_spu_id : ""
page : "0"
page_size : "10"
assert: 0
\ No newline at end of file
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