Commit 77ea1dc9 authored by 张慧's avatar 张慧

Merge branch 'common_dev' into zhanghui_dev

"合并次卡相关用例完善"
parents 904997f5 b0e88e8d
......@@ -49,6 +49,27 @@ class feed_request(BaseRequest):
return self.api_send(self.data["free_recruit_list"])
# 免费招募活动详情
def free_recruit_detail(self, current_city_id, id):
self.params["current_city_id"] = current_city_id
self.params["id"] = id
return self.api_send(self.data["free_recruit_detail"])
# 招募活动获取用户抽奖状态
def user_status(self, current_city_id, recruit_id):
self.params["current_city_id"] = current_city_id
self.params["recruit_id"] = recruit_id
return self.api_send(self.data["user_status"])
# 招募活动获取中奖名单
def winning_user_lis(self, recruit_id, json):
self.params["recruit_id"] = recruit_id
self.params["json"] = json
return self.api_send(self.data["winning_user_lis"])
if __name__ == '__main__':
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
......@@ -60,4 +81,13 @@ if __name__ == '__main__':
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
print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
# 免费招募活动详情
print(feed_request().free_recruit_detail("beijing", "43"))
# 免费招募获取用户状态
print(feed_request().user_status("beijing", "43"))
# 免费招募查看中奖名单
print(feed_request().winning_user_lis("44", " "))
\ No newline at end of file
......@@ -55,4 +55,37 @@ free_recruit_list:
size: ${size}
data:
json: { }
isLogin: 1
#招募活动详情
free_recruit_detail:
method: get
url: /api/feed/free_recruit/detail
params:
current_city_id: ${current_city_id}
id: ${id}
data:
json: { }
isLogin: 1
#招募活动详情
user_status:
method: get
url: /api/feed/free_recruit/user_status
params:
current_city_id: ${current_city_id}
recruit_id: ${recruit_id}
data:
json: { }
isLogin: 1
#招募活动查看中奖名单
winning_user_lis:
method: get
url: /api/feed/free_recruit/winning_user_list
params:
recruit_id: ${recruit_id}
json: ${json}
data:
json: { }
isLogin: 1
\ No newline at end of file
......@@ -52,7 +52,11 @@ class search_request(BaseRequest):
self.params["device_id"] = device_id
return self.api_send(self.data["hospital"])
if __name__ == '__main__':
# 打印购物车-猜你喜欢列表接口返回
print(search_request().hospital(82, [], "眼部整形", 10, "869378034450718"))
......@@ -48,4 +48,5 @@ hospital:
count: ${count}
device_id: ${device_id}
data: {}
json: {}
\ No newline at end of file
json: {}
......@@ -33,6 +33,23 @@ class user_request(BaseRequest):
return self.api_send(self.data["canclefavor"])
#我的-日记
def my_diary_v2(self, start_num, count):
self.params["start_num"] = start_num
self.params["count"] = count
return self.api_send(self.data["my_diary_v2"])
# 我的-日记
def user_tractate(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["user_tractate"])
if __name__ == '__main__':
#个人中心
......@@ -47,4 +64,9 @@ if __name__ == '__main__':
# print(user_request().topic_canclefavor())
#我的-日记
print(user_request().my_diary_v2(0, 10))
#我的-帖子
print(user_request().user_tractate(1, 10))
......@@ -38,3 +38,25 @@ canclefavor:
json: {}
isLogin: 1
# 我的-日记
my_diary_v2:
method: GET
url: /api/user/my_diary/v2
params:
start_num: ${start_num}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-帖子
user_tractate:
method: GET
url: /api/user/tractate
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -72,6 +72,9 @@ class web_request(BaseRequest):
def artemis_order_id_detail(self):
"上线中订单详情页"
return self.api_send(self.ACCOUNT_URL["artemis_order_id_detail"])
def cpc_community_homepage(self):
"点点通-内容-概览"
return self.api_send(self.ACCOUNT_URL["cpc_community_homepage"])
......@@ -96,4 +99,5 @@ if __name__ == '__main__':
print(web_request().artemis_order_list(0, 1))
print(web_request().artemis_order_list(1, 1))
print(web_request().artemis_order_list(2, 1))
print(web_request().artemis_order_id_detail())
\ No newline at end of file
print(web_request().artemis_order_id_detail())
print(web_request().cpc_community_homepage())
\ No newline at end of file
......@@ -153,4 +153,12 @@ artemis_order_id_detail:
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
cpc_community_homepage:
method: get
url: /api/web/cpc_community/homepage
params: {}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -435,6 +435,8 @@ VALUEORDERIDDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_da
ADPACKAGEORDERDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_ad_packageorder_detail.yaml")
#医生后台-点点通商品-概览
CPCHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_homepage.yaml")
#医生后台-点点通内容-概览
CPCCOMMUNITYHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_homepage.yaml")
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_beauty_card.yaml")
......@@ -526,5 +528,25 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
PAGE_RULES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
PAGE_RULES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "page_rules.yaml")
#免费招募活动详情
FREE_RECRUIT_DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_detail.yaml")
#免费招募获取用户抽奖状态
USER_STATUS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
USER_STATUS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "user_status.yaml")
#免费招募活动查看中奖名单
WINNING_USER_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
WINNING_USER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "winning_user_lis.yaml")
#我的-日记
MY_DIARY_V2_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
MY_DIARY_V2 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "my_diary_v2.yaml")
#我的-帖子
USER_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "user_tractate.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 TestFreeRecruitDetail:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_DETAIL)
free_recruit_detail_case, free_recruit_detail_data = get_ids(data, "free_recruit_detail")
@pytest.mark.parametrize("param", free_recruit_detail_data, ids=free_recruit_detail_case)
def test_free_recruit_detail_case(self, param):
r = feed_request().free_recruit_detail(param["current_city_id"], param["id"])
if r["error"] == 0:
assert r["data"]["free_recruit"]["id"] != 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 TestUserStatus:
data = BaseRequest().api_load(path_setting.USER_STATUS)
user_status_case, user_status_data = get_ids(data, "user_status")
@pytest.mark.parametrize("param", user_status_data, ids=user_status_case)
def test_user_status_case(self, param):
r = feed_request().user_status(param["current_city_id"], param["id"])
if r["error"] == 0:
assert r["data"]["is_regist"] == 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 TestWinningUserList:
data = BaseRequest().api_load(path_setting.WINNING_USER_LIST)
winning_user_list_case, winning_user_list_data = get_ids(data, "winning_user_lis")
@pytest.mark.parametrize("param", winning_user_list_data, ids=winning_user_list_case)
def test_winning_user_list_case(self, param):
r = feed_request().winning_user_lis(param["recruit_id"], param["json"])
if r["error"] == 0:
assert r["data"]["users"][0]["id"] != param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestMyDiaryV2:
data = BaseRequest().api_load(path_setting.MY_DIARY_V2)
mydiaryv2_case, mydiaryv2_data = get_ids(data, "my_diary_v2")
@pytest.mark.parametrize("param", mydiaryv2_data, ids=mydiaryv2_case)
def test_my_diary_v2(self, param):
r = user_request().my_diary_v2(param["start_num"], param["count"])
if r["error"] == 0:
# assert r["data"]["diaries"] >= param["assert"]
assert len(r["data"]["diaries"]) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestUserTractate:
data = BaseRequest().api_load(path_setting.USER_TRACTATE)
user_tractate_case, user_tractate_data = get_ids(data, "user_tractate")
@pytest.mark.parametrize("param", user_tractate_data, ids=user_tractate_case)
def test_user_tractate(self, param):
r = user_request().user_tractate(param["page"], param["count"])
if r["error"] == 0:
assert len(r["data"]["tractates"]) >= param["assert"]
free_recruit_detail:
#社区免费招募活动详情
-
case: "招募活动详情图片"
current_city_id: "beijing"
assert: null
id: 43
user_status:
#免费招募获取用户抽奖状态
-
case: "招募活动获取用户抽奖"
current_city_id: "beijing"
assert: true
id: 43
winning_user_lis:
#免费招募活动查看中奖名单
-
case: "招募活动查看中奖名单"
recruit_id: "44"
json:
assert: null
my_diary_v2:
#我的-日记
-
case: "我的页面-日记"
start_num: 0
count: 20
assert: 0
user_tractate:
-
#我的-帖子
case: "我的页面-帖子"
page: 1
count: 10
assert: 0
......@@ -18,4 +18,6 @@ class TestArtemisOrderList:
if r["error"] == 0:
orders = r.get("data").get("orders", [])
assert len(orders) >= param["assert"]
if r["error"] == 300002:
assert r["message"] == param["assert_message"]
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 TestCpcCommunityHomepage:
data = BaseRequest().api_load(path_setting.CPCCOMMUNITYHOMEPAGE)
cpccommunityhomepage_case, cpccommunityhomepage_data = get_ids(data, "cpc_community_homepage")
@pytest.mark.parametrize("param",cpccommunityhomepage_data,ids=cpccommunityhomepage_case)
def test_cpc_community_homepage(self, param):
'''点点通-概览'''
r = web_request().cpc_community_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_order_list:
#我的服务订单case
-
case: "我的服务订单请求失败case"
case: "我的服务订单参数错误case"
status: ""
page: 1
assert: 0
assert_message: "错误参数: status"
-
case: "我的服务订单-待支付广告包case"
status: 0
......
cpc_community_homepage:
#点点通内容-概览case
-
case: "点点通内容概览"
#doctor_user_id: "602329"
assert: False
assert_account: 0
assert1: True
\ 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