Commit f5963a64 authored by 张淑琴's avatar 张淑琴

概览

parent aef627cd
......@@ -61,6 +61,9 @@ 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"])
......@@ -77,4 +80,5 @@ 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())
\ No newline at end of file
......@@ -119,4 +119,12 @@ conversation_user_id:
t: ${t}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
json: {}
isLogin: 1 #需要登录
cpc_homepage:
method: get
url: /api/web/cpc/homepage
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -274,7 +274,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信息
......@@ -384,6 +383,8 @@ 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")
#医生后台-点点通商品-概览
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")
......
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"]
cpc_homepage:
#点点通商品-概览case
-
case: "点点通商品概览"
#doctor_user_id: "602329"
assert: False
assert_account: 0
assert1: True
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