Commit 882befc4 authored by edz's avatar edz

合并common

parents 2a07750e 1f301f3f
......@@ -4,7 +4,6 @@ detail:
url: /api/answer/detail
params:
current_city_id: ${current_city_id}
data:
answer_id: ${answer_id}
json: {}
# isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
......
......@@ -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
import path_setting
from in_common.base_request import BaseRequest
class live_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.LIVESERVICES_CONFIG)
self.data = self.api_load(path_setting.LIVEGIFTS_CONFIG)
self.data = self.api_load(path_setting.SEARCHSERVICE_CONFIG)
self.data = self.api_load(path_setting.ADDLIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETELIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETEGIFT_CONFIG)
#主播-推荐袋美购列表展示
def live_services(self, channel_id, stream_id, offset, size):
self.params["channel_id"] = channel_id
self.params["stream_id"] = stream_id
self.params["offset"] = offset
self.params["size"] = size
return self.api_send(self.data["live_services"])
#主播-推荐袋美券列表展示
def live_gifts(self, channel_id, gift_type, stream_id, offset, size):
self.params["channel_id"] = channel_id
self.params["gift_type"] = gift_type
self.params["stream_id"] = stream_id
self.params["offset"] = offset
self.params["size"] = size
return self.api_send(self.data["live_gifts"])
#主播-推荐袋商品捜索功能
def search_service(self, current_city_id, channel_id, query, offset, size, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["current_city_id"] = current_city_id
self.params["channel_id"] = channel_id
self.params["query"] = query
self.params["offset"] = offset
self.params["size"] = size
self.params["version"] = version
return self.api_send(self.data["search_service"])
#主播-推荐袋美券捜索功能
def search_gifts(self, current_city_id, channel_id, gift_type, offset, size, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["current_city_id"] = current_city_id
self.params["channel_id"] = channel_id
self.params["gift_type"] = gift_type
self.params["offset"] = offset
self.params["size"] = size
self.params["version"] = version
return self.api_send(self.data["search_gifts"])
#主播-推荐袋添加商品
def add_live_service(self, channel_id, service_item_ids, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["service_item_ids"] = service_item_ids
self.params["version"] = version
return self.api_send(self.data["add_live_service"])
#主播-推荐袋删除商品
def delete_live_service(self, channel_id, live_service_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["live_service_id"] = live_service_id
self.params["version"] = version
return self.api_send(self.data["delete_live_service"])
#主播-推荐袋删除美券
def delete_live_gift(self, channel_id, gift_id, gift_type, stream_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["gift_id"] = gift_id
self.params["gift_type"] = gift_type
self.params["stream_id"] = stream_id
self.params["version"] = version
return self.api_send(self.data["delete_live_gift"])
if __name__ == '__main__':
print(live_request().live_services("745", "4177", "0", "10"))
print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0"))
print(live_request().add_live_service("745", "560641", "7.45.0"))
print(live_request().delete_live_service("745", "7242", "7.45.0"))
\ No newline at end of file
#主播-推荐袋美购列表展示
live_services:
method: GET
url: /api/janus/live/live_services
params:
channel_id: ${channel_id}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋美券列表展示
live_gifts:
method: GET
url: /api/janus/live/live_gifts
params:
channel_id: ${channel_id}
gift_type: ${gift_type}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋商品捜索功能
search_service:
method: GET
url: /api/janus/live/search_service
params:
current_city_id: ${current_city_id}
channel_id: ${channel_id}
query: ${query}
offset: ${offset}
size: ${size}
version: ${version}
data: {}
json: {}
isLogin: 1
#主播-推荐袋添加商品
add_live_service:
method: POST
url: /api/janus/live/add_live_service
params:
version: ${version}
data:
channel_id: ${channel_id}
service_item_ids: ${service_item_ids}
json: {}
isLogin: 1
#主播-推荐袋删除商品
delete_live_service:
method: POST
url: /api/janus/live/delete_live_service
params:
version: ${version}
data:
channel_id: ${channel_id}
live_service_id: ${live_service_id}
json: {}
isLogin: 1
#主播-推荐袋删除美券
delete_live_gift:
method: POST
url: /api/janus/live/delete_live_gift
params:
version: ${version}
data:
channel_id: ${channel_id}
gift_id: ${gift_id}
gift_type: ${gift_type}
stream_id: ${stream_id}
json: {}
isLogin: 1
......@@ -22,6 +22,7 @@ class living_request(BaseRequest):
return self.api_send(self.data["pushlive_info"])
if __name__ == '__main__':
(living_request().danmu_v2("739", "1"))
(living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
\ No newline at end of file
......@@ -24,3 +24,32 @@ pushlive_info:
json: {}
isLogin: 1
#主播-推荐袋美购列表展示
live_services:
method: GET
url: /api/janus/live/live_services
params:
channel_id: ${channel_id}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋商品捜索功能
search_services:
method: GET
url: /api/janus/live/search_services
params:
current_city_id: ${current_city_id}
channel_id: ${channel_id}
query: ${query}
offset: ${offset}
size: ${size}
trace_id: ${trace_id}
data: {}
json: {}
isLogin: 1
......@@ -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: {}
......@@ -53,7 +53,6 @@ class tractate_request(BaseRequest):
self.params["reply_id"] = reply_id
return self.api_send(self.data["tractate_cancelvote"])
# 帖子创建一级&二级评论
def publish_reply(self, tractate_id, data_type, reply_id, content):
self.params["tractate_id"] = tractate_id
......@@ -62,5 +61,10 @@ class tractate_request(BaseRequest):
self.params["content"] = content
return self.api_send(self.data["publish_reply"])
# 帖子创建--登录下
def create(self):
return self.api_send(self.data["create"])
# 帖子创建--未登录下
def create_unlogin(self):
return self.api_send(self.data["create_unlogin"])
......@@ -100,4 +100,24 @@ publish_reply:
content: ${content}
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
#帖子创建一-未登录
create_unlogin:
method: get
url: /api/tractate/create
params:
data:
json: {}
isLogin: 0 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
#帖子创建一-登录
create:
method: get
url: /api/tractate/create
params:
data:
json: {}
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#
\ No newline at end of file
......@@ -45,6 +45,23 @@ class user_request(BaseRequest):
#我的-日记
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__':
#个人中心
......@@ -59,4 +76,9 @@ if __name__ == '__main__':
# print(user_request().topic_canclefavor())
print(user_request().follow_del("33909625","4196"))
#我的-日记
print(user_request().my_diary_v2(0, 10))
#我的-帖子
print(user_request().user_tractate(1, 10))
......@@ -38,6 +38,7 @@ canclefavor:
json: {}
isLogin: 1
<<<<<<< HEAD
#直播-关注主播
follow_add:
method: post
......@@ -60,3 +61,27 @@ follow_del:
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
......@@ -71,5 +71,5 @@ if __name__ == '__main__':
print(web2_request().artemis_ad_add_shopping_cart_info())
print(web2_request().artemis_add_value_order_id_detail())
print("---11233353667----")
#print(web2_request().artemis_ad_packageorder_detail("685529883901"))
print(web2_request().artemis_ad_packageorder_detail("685529883901"))
......@@ -86,7 +86,7 @@ artemis_ad_packageorder_detail:
method: get
url: /api/web2/artemis/ad/packageorder/detail
params:
package_order_id:${package_order_id}
package_order_id: ${package_order_id}
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
......@@ -3,3 +3,4 @@ develop_host:
om: http://om.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend_online: https://backend.igengmei.com
......@@ -85,6 +85,8 @@ TRACTATE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate
TRACTATE_VOTE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate_data", "vote.yaml")
# 帖子详情页--一级评论创建
TRACTATE_PUBLISH_REPLY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate_data", "publish_reply.yaml")
#发帖子--帖子内容创建
TRACTATE_CREATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tractate_data", "create.yaml")
# 问答详情页--问题详情
......@@ -97,8 +99,6 @@ ANSWER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_data
QA_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "qa_request.yaml")
# -问题的收藏&取消收藏
QA_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/qa_data", "favor.yaml")
# -test的文件,尝试在不动原函数的基础上加参数而不是用默认参数。--没必要
# TEST_QA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/qa_data", "test.yaml")
# 回答评论点赞&取消点赞
......@@ -431,8 +431,12 @@ ORDERLIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "arte
ORDERIDDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "artemis_order_id_detail.yaml")
#医生后台-我的服务订单-已购买订单
VALUEORDERIDDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_add_value_order_id_detail.yaml")
#医生后台-我的服务订单-已购买广告包
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")
......@@ -524,9 +528,64 @@ 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")
#直播polling循环
POLLING_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
POLLING = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "polling.yaml")
#直播关注/取关主播
FOLLOW_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_add.yaml")
FOLLOW_DEL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_del.yaml")
\ No newline at end of file
FOLLOW_DEL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "follow_del.yaml")
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
LIVESERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "live_services.yaml")
#主播-推荐袋美券列表展示
LIVEGIFTS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
LIVEGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "live_gifts.yaml")
#主播-推荐袋商品搜索功能
SEARCHSERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
SEARCHSERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "search_service.yaml")
#主播-推荐袋美券搜索功能
SEARCHGIFTS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "search_gifts.yaml")
#主播-推荐袋添加商品
ADDLIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
ADDLIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "add_live_service.yaml")
#主播-推荐袋删除商品
DELETELIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
DELETELIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_service.yaml")
#主播-推荐袋删除美券
DELETEGIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
DELETEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_gift.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)
......@@ -3,20 +3,30 @@ import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.account_request import account_request
from all_backend_api.answer_request import answer_request
class TestLoginVfc:
data = BaseRequest().api_load(path_setting.LOGIN_VFC)
loginvfc_case, loginvfc_data = get_ids(data, "login_vfc")
class TestDetail:
data = BaseRequest().api_load(path_setting.DETAIL)
detail_case, detail_data = get_ids(data, "detail")
@pytest.mark.parametrize("param",detail_data,ids=detail_case)
def test_detail(self,param):
# print(param["vfc_code"])
r = answer_request().detail(param["current_city_id"], param["answer_id"])
# if r["error"] == 0:
# assert r["data"]["account_phone"] == param["assert"]
# if r["error"] == 1:
# assert r["message"] == param["assert"]
assert r["data"]["is_favored"] is not None and r["data"]["is_favored"] is not ""
assert r["data"]["comment_num"] is not None and r["data"]["comment_num"] is not ""
assert r["data"]["time"] is not None and r["data"]["time"] is not ""
assert r["data"]["vote_num"] is not None and r["data"]["vote_num"] is not ""
assert r["data"]["is_following"] is not None and r["data"]["is_following"] is not ""
assert r["data"]["is_author"] is not None and r["data"]["is_author"] is not ""
assert r["data"]["is_voted"] is not None and r["data"]["is_voted"] is not ""
assert r["data"]["view_num"] is not None and r["data"]["view_num"] is not ""
assert r["data"]["answer_id"] is not None and r["data"]["answer_id"] is not ""
@pytest.mark.parametrize("param",loginvfc_data,ids=loginvfc_case)
def test_login_vfc(self,param):
print(param["vfc_code"])
r = account_request().login_vfc(param["current_city_id"], param["phone_num"], param["vfc_code"])
if r["error"] == 0:
assert r["data"]["account_phone"] == param["assert"]
if r["error"] == 1:
assert r["message"] == 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 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"]
......@@ -8,14 +8,13 @@ from all_backend_api.hybrid_request import hybrid_request
class TestAnswerAnswerReplyVote:
data = BaseRequest().api_load(path_setting.QA_REPLY_VOTE)
test_case, test_data = get_ids(data, "answer_reply_vote")
answeranswerreplyvote_case, answeranswerreplyvote_data = get_ids(data, "answer_reply_vote")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", answeranswerreplyvote_data, ids=answeranswerreplyvote_case)
def test_answer_answer_reply_vote(self, param):
# 直接点赞,看是否能点赞,如果返回1,就直接进入取消点赞
vote = hybrid_request().answer_reply_vote(param["id"])
if vote["error"] == 0:
print(1)
# 校验二次点赞无效
vote = hybrid_request().answer_reply_vote(param["id"])
assert vote["message"] == param["assert3"]
......@@ -23,14 +22,12 @@ class TestAnswerAnswerReplyVote:
# 取消点赞,回到取消点赞的状态
cancelvote = hybrid_request().answer_reply_cancel_vote(param["id"])
assert cancelvote["error"] == 0
print(2)
else:
assert vote["error"] == 1
assert vote["message"] == param["assert3"]
# 取消点赞,回到取消点赞的状态
cancelvote = hybrid_request().answer_reply_cancel_vote(param["id"])
assert cancelvote["error"] == 0
print(2)
......
......@@ -7,11 +7,11 @@ from all_backend_api.hybrid_request import hybrid_request
class TestQuestionNewAnswerLiist:
class TestQuestionNewAnswerList:
data = BaseRequest().api_load(path_setting.ANSWER_LIST)
test_case, test_data = get_ids(data, "question_new_answer_list")
questionnewanswerlist_case, questionnewanswerlist_data = get_ids(data, "question_new_answer_list")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", questionnewanswerlist_data, ids=questionnewanswerlist_case)
def test_question_v1(self, param):
r = hybrid_request().question_new_answer_list(param["question_id"])
if r["error"] == 0:
......
......@@ -9,9 +9,9 @@ from all_backend_api.hybrid_request import hybrid_request
class TestQuestionV1:
data = BaseRequest().api_load(path_setting.QUESTION_DETAIL)
test_case, test_data = get_ids(data, "question_v1")
questionv1_case, questionv1_data = get_ids(data, "question_v1")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", questionv1_data, ids=questionv1_case)
def test_question_v1(self, param):
r = hybrid_request().question_v1()
assert r["error"] == param["error"]
......
......@@ -14,6 +14,18 @@ class TestBeautyCardOrderConfirm:
def test_beauty_card_order_confirm(self, param):
r = janus_request().beauty_card_order_confirm(param["sku_id"], param["number"], param["use_bc_coupon"], param["bc_coupon_id"])
if r["error"] == 0:
if param["number"] == 1: #购买1个sku时
assert r["error"] == param["assert_error"]
assert r["data"]["payment_total_price"] == param["assert_total_price"]
assert r["data"]["payment_total_fee"] == param["assert_total_fee"]
assert r["data"]["user_buy_lower_limit"] == param["assert_user_buy_lower_limit"]
assert r["data"]["user_buy_upper_limit"] == param["assert_user_buy_upper_limit"]
assert r["data"]["is_doctor_see"] == param["assert_is_doctor_see"]
if param["number"] == 2: #购买2个sku时
assert r["error"] == param["assert_error"]
assert r["data"]["payment_total_price"] == param["assert_total_price"]
assert r["data"]["payment_total_fee"] == param["assert_total_fee"]
assert r["data"]["user_buy_lower_limit"] == param["assert_user_buy_lower_limit"]
assert r["data"]["user_buy_upper_limit"] == param["assert_user_buy_upper_limit"]
......@@ -16,6 +16,13 @@ class TestBeautyCardOrderSubmit:
param["is_doctor_see"], param["gain_coupon_id"],
param["deduction_price"])
if r["error"] == 0:
if param["is_doctor_see"] == 1 and param["number"] == 1:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
if param["is_doctor_see"] == 0 and param["number"] == 1:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
if param["number"] == 2:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
......@@ -8,9 +8,9 @@ from all_backend_api.janus_request import janus_request
class TestProductMallServiceHomeFeed:
data = BaseRequest().api_load(path_setting.FEED_TAB_SERVICE)
test_case, test_data = get_ids(data, "feed_service")
productmallservicehomefeed_case, productmallservicehomefeed_data = get_ids(data, "feed_service")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", productmallservicehomefeed_data, ids=productmallservicehomefeed_case)
def test_product_mall_service_home_feed(self,param):
r = janus_request().feed_service(param["tab_value"], param["first_load"])
assert r["error"] == 0
......
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestAddLiveService:
data = BaseRequest().api_load(path_setting.ADDLIVESERVICE)
addliveservice_case, addliveservice_data = get_ids(data, "add_live_service")
@pytest.mark.parametrize("param", addliveservice_data, ids=addliveservice_case)
def test_add_live_service(self, param):
print(111111111111111111111)
r = live_request().add_live_service(param["channel_id"], param["service_item_ids"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestDeleteLiveGift:
data = BaseRequest().api_load(path_setting.DELETEGIFT)
deletelivegift_case, deletelivegift_data = get_ids(data, "delete_live_gift")
@pytest.mark.parametrize("param", deletelivegift_data, ids=deletelivegift_case)
def test_delete_live_gift(self, param):
print(111111111111111111111)
r = live_request().delete_live_gift(param["channel_id"], param["gift_id"], param["stream_id"], param["gift_type"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestDeleteLiveService:
data = BaseRequest().api_load(path_setting.DELETELIVESERVICE)
deleteliveservice_case, deleteliveservice_data = get_ids(data, "delete_live_service")
@pytest.mark.parametrize("param", deleteliveservice_data, ids=deleteliveservice_case)
def test_delete_live_service(self, param):
print(111111111111111111111)
r = live_request().delete_live_service(param["channel_id"], param["live_service_id"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestLiveGifts:
data = BaseRequest().api_load(path_setting.LIVEGIFTS)
livegifts_case, livegifts_data = get_ids(data, "live_gifts")
@pytest.mark.parametrize("param", livegifts_data, ids=livegifts_case)
def test_live_gifts(self, param):
print(111111111111111111111)
r = live_request().live_gifts(param["channel_id"], param["gift_type"], param["stream_id"], param["offset"], param["size"])
if r["error"] == 0:
assert r["data"]["offset"] == param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestLiveServices:
data = BaseRequest().api_load(path_setting.LIVESERVICES)
liveservices_case, liveservices_data = get_ids(data, "live_services")
@pytest.mark.parametrize("param", liveservices_data, ids=liveservices_case)
def test_live_services(self, param):
print(111111111111111111111)
r = live_request().live_services(param["channel_id"], param["stream_id"], param["offset"], param["size"])
if r["error"] == 0:
assert r["data"]["offset"] == param["assert"]
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.janus_live_request import live_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestSearchService:
data = BaseRequest().api_load(path_setting.SEARCHSERVICE)
searchservice_case, searchservice_data = get_ids(data, "search_service")
@pytest.mark.parametrize("param", searchservice_data, ids=searchservice_case)
def test_search_service(self, param):
print(111111111111111111111)
r = live_request().search_service(param["current_city_id"], param["channel_id"], param["query"], param["offset"], param["size"], param["version"])
if r["error"] == 0:
assert r["data"]["services"] != param["assert"]
\ No newline at end of file
......@@ -18,5 +18,16 @@ class TestShareV4:
def test_share_v4(self,param):
r = oneimage_request().share_v4(param["version"], param["face_id"])
assert r["error"] == 0
face_name = r["data"]["face_desc"]["face_name"]
assert face_name is not None
classification_info = r["data"]["classification_info"]
# 测颜值结果,保证五官有值
for key,value in classification_info.items():
print(key, value["name"], value["param"])
assert value["name"] is not None
assert value["param"] is not None
# 颜值报告
content = r["data"]["tractate_info"]["content"]
print(content)
assert content is not None
......@@ -8,9 +8,9 @@ from all_backend_api.qa_request import qa_request
class TestFavor:
data = BaseRequest().api_load(path_setting.QA_FAVOR)
test_case, test_data = get_ids(data, "favor")
favor_case, favor_data = get_ids(data, "favor")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", favor_data, ids=favor_case)
def test_favor(self, param):
r = qa_request().favor(param["answer_id"])
assert r["error"] == param["error"]
......
......@@ -8,9 +8,9 @@ from all_backend_api.service_request import service_request
class TestProductMallServiceHomeFeed:
data = BaseRequest().api_load(path_setting.FEED_TAB_SERVICE_DOCTORS)
test_case, test_data = get_ids(data, "home_feed")
productmallservicehomefeed_case, productmallservicehomefeed_data = get_ids(data, "home_feed")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", productmallservicehomefeed_data, ids=productmallservicehomefeed_case)
def test_product_mall_service_home_feed(self,param):
r = service_request().feed_home(param["tab_value"], param["input_type"])
assert r["error"] == 0
......
import json
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.tractate_request import tractate_request
class TestCreate:
data = BaseRequest().api_load(path_setting.TRACTATE_CREATE)
create_case, create_data = get_ids(data, "create")
@pytest.mark.parametrize("param", create_data, ids=create_case)
def test_create(self, param):
# 登录了的-校验
r = tractate_request().create()
assert r["error"] == param["error1"]
# 未登录的-校验
s = tractate_request().create_unlogin()
s = json.loads(s)
# r = json.loads(r)
# print(type(r))
assert s["message"] == param["message1"]
......@@ -8,9 +8,9 @@ from all_backend_api.tractate_request import tractate_request
class TestFavor:
data = BaseRequest().api_load(path_setting.TRACTATE_FAVOR)
test_case, test_data = get_ids(data, "favor")
favor_case, favor_data = get_ids(data, "favor")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", favor_data, ids=favor_case)
def test_favor(self, param):
r = tractate_request().favor(param["tractate_id"], param["data_type"])
# print(r)
......
......@@ -8,9 +8,9 @@ from all_backend_api.tractate_request import tractate_request
class TestPublishReply:
data = BaseRequest().api_load(path_setting.TRACTATE_PUBLISH_REPLY)
test_case, test_data = get_ids(data, "publish_reply")
publishreply_case, publishreply_data = get_ids(data, "publish_reply")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", publishreply_data, ids=publishreply_case)
def test_publish_reply(self, param):
r = tractate_request().publish_reply(param["tractate_id"], param["data_type"], param["reply_id"], param["content"])
# print(r)
......
......@@ -7,9 +7,9 @@ from all_backend_api.tractate_request import tractate_request
class TestReply:
data = BaseRequest().api_load(path_setting.TRACTATE_REPLY)
test_case, test_data = get_ids(data, "reply")
reply_case, reply_data = get_ids(data, "reply")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", reply_data, ids=reply_case)
def test_reply(self, param):
r = tractate_request().reply( param["current_city_id"], param["id"], param["data_type"] )
# print(r)
......
......@@ -9,9 +9,9 @@ from all_backend_api.tractate_request import tractate_request
class TestVote:
data = BaseRequest().api_load(path_setting.TRACTATE_VOTE)
test_case, test_data = get_ids(data, "tractate_vote")
vote_case, vote_data = get_ids(data, "tractate_vote")
@pytest.mark.parametrize("param", test_data, ids=test_case)
@pytest.mark.parametrize("param", vote_data, ids=vote_case)
def test_vote(self, param):
r = tractate_request().tractate_detail(param["current_city_id"], param["tractate_id"], param["data_type"])
if r["error"] == 0:
......@@ -22,12 +22,62 @@ class TestVote:
assert vote["error"] == 0
assert vote["message"] == param["message1"]
# 取消点赞,回到取消点赞的状态
canclevote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
assert canclevote["error"] == 0
cancelvote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
assert cancelvote["error"] == 0
else:
# 如果是已经点过赞的状态就直接取消点赞
canclevote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
assert canclevote["message"] == param["message2"]
cancelvote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
assert cancelvote["message"] == param["message2"]
# r = tractate_request().tractate_detail(param["current_city_id"], param["tractate_id"], param["data_type"])
# if r["error"] == 0:
# assert r["error"] == param["assert1"]
# # 如果没有点过赞,就先校验点赞之后再取消点赞。【最后保持取消点赞的状态】
# if not r["data"]["tractate_list"]["is_voted"]:
# vote = tractate_request().tractate_vote(param["tractate_id"], param["data_type"], param["reply_id"])
# assert vote["error"] == 0
# assert vote["message"] == param["message"]
# print(param["position"])
# # # 取消点赞,回到取消点赞的状态
# # cancelvote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
# # assert cancelvote["error"] == 0
# elif param["position"] == 1:
# vote = tractate_request().tractate_vote(param["tractate_id"], param["data_type"], param["reply_id"])
# assert vote["error"] == 0
# assert vote["message"] == param["message"]
# print(param["position"])
# else:
# # 如果是已经点过赞的状态就直接取消点赞
# cancelvote = tractate_request().tractate_cancelvote(param["tractate_id"], param["data_type"], param["reply_id"])
# assert cancelvote["message"] == param["message"]
# print(param["position"])
......
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
......@@ -3,6 +3,5 @@ question_v1:
-
case: "问题详情"
error: 0
assert: false
assert2: true
beauty_card_order_confirm:
-
case: "次卡-确认订单-接口调用成功case"
case: "次卡-确认订单-sku数量为1"
sku_id: "10176"
number: 1
use_bc_coupon: 1
bc_coupon_id: 0
assert_error: 0
assert_error: 0 #校验接口调用成功case
assert_total_price: "2.00" #校验订单总金额case
assert_total_fee: "2.00" #校验实付金额case
assert_user_buy_lower_limit: 1 #校验最少购买数case
assert_user_buy_upper_limit: 3 #校验最多购买数case
assert_is_doctor_see: true #校验是否同意商家电话咨询case
-
case: "次卡-确认订单-sku数量为2"
sku_id: "10176"
number: 2
use_bc_coupon: 1
bc_coupon_id: 0
assert_error: 0 #校验接口调用成功case
assert_total_price: "4.00" #校验订单总金额case
assert_total_fee: "4.00" #校验实付金额case
assert_user_buy_lower_limit: 1 #校验最少购买数case
assert_user_buy_upper_limit: 3 #校验最多购买数case
beauty_card_order_submit:
-
case: "次卡-提交订单-校验接口返回成功case"
case: "次卡-提交订单-同意商家咨询"
phone: "12345678912"
sku_id: "10176"
number: 1
is_doctor_see: 1
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
\ No newline at end of file
assert_error: 0
assert_status: 1
-
case: "次卡-提交订单-不同意商家咨询"
phone: "12345678912"
sku_id: "10176"
number: 1
is_doctor_see: 0
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
assert_status: 1
-
case: "次卡-提交订单-购买数量为2"
phone: "12345678912"
sku_id: "10176"
number: 2
is_doctor_see: 1
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
assert_status: 1
\ No newline at end of file
add_live_service:
#主播-推荐袋添加商品-添加一个商品
-
case: "主播-推荐袋添加商品-添加一个商品"
channel_id: "747"
service_item_ids: "560641"
version: "7.45.0"
assert : 成功添加1件商品
#主播-推荐袋添加商品-添加多个商品
-
case: "主播-推荐袋添加商品-添加多个商品"
channel_id: "747"
service_item_ids: "108278,578088,585823"
version: "7.45.0"
assert : 成功添加3件商品
\ No newline at end of file
delete_live_gift:
#主播-推荐袋删除美券-美券成功删除
-
case: "主播-推荐袋删除美券-美券成功删除"
channel_id: "745"
gift_id: "59088"
gift_type: "1"
stream_id: "4207"
version: "7.45.0"
assert : 美券已删除
\ No newline at end of file
delete_live_service:
#主播-推荐袋删除商品-商品成功删除
-
case: "主播-推荐袋删除商品-商品成功删除"
channel_id: "745"
live_service_id: "7251"
version: "7.45.0"
assert : 商品已删除
\ No newline at end of file
live_gifts:
#主播-推荐袋美券列表正常展示
-
case: "主播-推荐袋美券列表正常展示"
channel_id: "745"
gift_type: "3"
stream_id: "4205"
offset: "0"
size: "20"
assert : 0
live_services:
#主播-推荐袋美购列表正常展示
-
case: "主播-推荐袋美购列表正常展示"
channel_id: "746"
stream_id: "4181"
offset: "0"
size: "20"
assert : 20
search_service:
#主播-推荐袋商品搜索功能
-
case: "主播-推荐袋商品搜索功能"
current_city_id: "beijing"
channel_id: "745"
query: ""
offset: "0"
size: "20"
version: "7.45.0"
assert : 0
#主播-推荐袋商品搜索功能-捜索双眼皮
-
case: "主播-推荐袋商品搜索功能-捜索双眼皮"
current_city_id: "beijing"
channel_id: "745"
query: "双眼皮"
offset: "0"
size: "20"
version: "7.45.0"
assert : 0
create:
#发帖子--创建帖子页面接口校验
-
case: "发帖子--创建帖子页面接口校验-"
current_city_id: "beijiing"
error1: 0
message1: "请登录后再试"
tractate_vote:
#贴子详情页点赞
#贴子详情页点赞----简单粗暴直接全部用写死的数据【不同帖子代表不同类型--并且把取消点赞接口迁移出去--指定输入-指定输出】
#position代表要用的是什么类型的case---不是必须有但有了比较好区分--从0开始【已废弃这个想法】
#技术水准有限拆不开,就写个点赞-二次点赞--取消点赞的闭环了;
-
case: "贴子详情页--点赞&取消点赞--用接口校验"
case: "贴子详情页--点赞--二次点赞---取消点赞--校验"
tractate_id: 175152
reply_id: ""
data_type: "user_post"
......@@ -12,7 +15,7 @@ tractate_vote:
-
case: "贴子详情页--一级评论点赞&取消点赞--用接口校验"
case: "贴子详情页--一级评论点赞--二次点赞--取消点赞--校验"
tractate_id: 175152
reply_id: "2167124"
data_type: "user_post"
......@@ -22,3 +25,100 @@ tractate_vote:
message2: "取消点赞成功"
# -
# case: "贴子详情页--点赞&取消点赞--用接口校验 --测试单纯点赞"
# tractate_id: 175152
# reply_id: ""
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 0
# -
# case: "贴子详情页--点赞&取消点赞--用接口校验--二次点赞校验"
# tractate_id: 175152
# reply_id: ""
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 1
# -
# case: "贴子详情页--点赞&取消点赞--用接口校验---取消点赞"
# tractate_id: 175152
# reply_id: ""
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "取消点赞成功"
# position: 2
##
# -
# case: "贴子详情页--一级评论点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 0
#
# -
# case: "贴子详情页--一级评论点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "点赞成功"
# position: 1
#
#
# -
# case: "贴子详情页--一级评论取消点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message: "取消点赞成功"
# position: 2
#
#
#
# case: "贴子详情页--一级评论点赞&取消点赞--用接口校验"
# tractate_id: 175152
# reply_id: "2167124"
# data_type: "user_post"
# current_city_id: "beijing"
# assert1: 0
# message1: "点赞成功"
# message2: "取消点赞成功"
#
my_diary_v2:
#我的-日记
-
case: "我的页面-日记"
start_num: 0
count: 20
assert: 0
user_tractate:
-
#我的-帖子
case: "我的页面-帖子"
page: 1
count: 10
assert: 0
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 TestArtemisAdPackageorderDetail:
data = BaseRequest().api_load(path_setting.ADPACKAGEORDERDETAIL)
adpackageorderdetail_case, adpackageorderdetail_data = get_ids(data, "artemis_ad_packageorder_detail")
@pytest.mark.parametrize("param",adpackageorderdetail_data,ids=adpackageorderdetail_case)
def test_artemis_ad_packageorder_detail(self, param):
'''我的服务订单-已支付广告包'''
r = web2_request().artemis_ad_packageorder_detail(param["package_order_id"])
print(r)
if r["error"] == 0:
advertise_source = r.get("data").get("info").get("advertise_source", [])
#ExtendValue["info"] = json.loads(ExtendValue["info"])
assert len(advertise_source) > param["assert"]
......@@ -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"]
......@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestService:
class TestConversationCoupon:
data = BaseRequest().api_load(path_setting.CONVERSATIONCOUPON)
conversationcoupon_case, conversationcoupon_data = get_ids(data, "conversation_coupon")
......
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_ad_packageorder_detail:
#我的服务订单-已支付广告包
-
case: "我的服务订单-已支付广告包"
package_order_id: "685529883901"
assert: 0
artemis_order_list:
#我的服务订单case
-
case: "我的服务订单请求失败case"
case: "我的服务订单参数错误case"
status: ""
page: 1
assert: 0
assert_message: "错误参数: status"
-
case: "我的服务订单-待支付广告包case"
status: 0
......
......@@ -5,7 +5,7 @@ conversation_coupon:
doctor_user_id: "602329"
assert: 0
-
case: "点击私信发送优惠券按钮接口报错"
case: "点击私信发送优惠券按钮缺少参数case"
doctor_user_id: "602329"
assert: 0
assert_message: '缺少参数: doctor_user_id'
......
......@@ -10,7 +10,7 @@ conversation_user_id:
assert_message: "消息发送成功"
assert_name: "露露2"
- case: "发送失败"
- case: "权限校验case:没有权限"
type: 0
content: 您好
doctor_user_id: 6023291
......
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