Commit 628c57a8 authored by edz's avatar edz

Merge branch 'common_dev' into crk_dev

parents 9e7ba03f e7ada468
......@@ -14,8 +14,18 @@ class account_request(BaseRequest):
self.params["face_token"] = face_token
return self.api_send(self.loginvfc["login_vfc"])
# 我的-头像点击
def account_homepage(self, user_id, device_id):
self.params["user_id"] = user_id
self.params["device_id"] = device_id
return self.api_send(self.loginvfc["account_homepage"])
if __name__ == '__main__':
# print(account_request().user_info())
print(account_request.loginvfc(""))
\ No newline at end of file
print(account_request.loginvfc(""))
print(account_request().account_homepage("33910245", "androidid_16a95f3fa31a4c0b"))
\ No newline at end of file
......@@ -12,3 +12,12 @@ login_vfc:
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
account_homepage:
method: get
url: /api/account/homepage
params:
user_id: ${user_id}
device_id: ${device_id}
data:
json: {}
isLogin: 1
\ No newline at end of file
......@@ -9,6 +9,8 @@ class live_request(BaseRequest):
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.POP_SERVICE_CONFIG)
self.data = self.api_load(path_setting.POP_GIFT_CONFIG)
self.data = self.api_load(path_setting.GET_GIFT_CONFIG)
self.data = self.api_load(path_setting.DELETELIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETEGIFT_CONFIG)
self.data = self.api_load(path_setting.M_GET_CHANNEL_STATUS_CONFIG)
......@@ -68,6 +70,19 @@ class live_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["pop_service"])
#om后台-弹出美券
def pop_gift(self, stream_id, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id
self.params["gift_id"] = gift_id
self.params["version"] = version
return self.api_send(self.data["pop_gift"])
#用户-领取美券
def get_gift(self, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["gift_id"] = gift_id
self.params["version"] = version
return self.api_send(self.data["get_gift"])
#主播-推荐袋删除商品
def delete_live_service(self, channel_id, live_service_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
......@@ -119,4 +134,6 @@ if __name__ == '__main__':
#print(live_request().m_get_channel_status("745", "7.46.0"))
# print(live_request().mark_live_service("4233", "745", "7269", "1", "746.0"))
# print(live_request().audience_services("4179","739","0","20"))
print(live_request().pop_service("4266", "7324", "1", "746.0"))
\ No newline at end of file
# print(live_request().pop_service("4266", "7324", "1", "746.0"))
# print(live_request().pop_gift("4271", "59124", "746.0"))
print(live_request().get_gift( "59124", "746.0"))
\ No newline at end of file
......@@ -52,7 +52,7 @@ add_live_service:
json: {}
isLogin: 1
#主播-添加商品后,购物车上方弹出商品卡片
#主播-添加商品后,购物车上方弹出商品卡片
pop_service:
method: GET
url: /api/janus/live/pop_service
......@@ -62,7 +62,30 @@ pop_service:
pop_type: ${pop_type}
version: ${version}
data: {}
json: { }
json: {}
isLogin: 1
#om后台-弹出美券
pop_gift:
method: GET
url: /api/janus/live/pop_gift
params:
stream_id: ${stream_id}
gift_id: ${gift_id}
version: ${version}
data: {}
json: {}
isLogin: 1
#用户-领取美券
get_gift:
method: POST
url: /api/janus/live/get_gift
params:
version: ${version}
data:
gift_id: ${gift_id}
json: {}
isLogin: 1
#主播-推荐袋删除商品
......
......@@ -119,6 +119,21 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_topics"])
# 我的-收藏-帖子
def favors_tractate(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_tractate"])
# 我的-收藏-回答
def favors_answers(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_answers"])
......@@ -158,6 +173,12 @@ if __name__ == '__main__':
# 我的-收藏-日记贴
print(user_request().favors_topics(0, 10))
# 我的-收藏-帖子
print(user_request().favors_tractate(1, 10))
# 我的-收藏-帖子
print(user_request().favors_answers(1, 10))
......@@ -157,3 +157,25 @@ favors_topics:
isLogin: 1
# 我的-收藏-帖子
favors_tractate:
method: GET
url: /api/user/favors/tractate
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-收藏-回答
favors_answers:
method: GET
url: /api/user/favors/answers
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -48,13 +48,16 @@ class web2_request(BaseRequest):
def artemis_ad_add_shopping_cart_info(self):
#我的购物车
return self.api_send(self.SERVICE_URL["artemis_ad_add_shopping_cart_info"])
def artemis_add_value_order_id_detail(self):
"我的服务订单-已购买"
return self.api_send(self.SERVICE_URL["artemis_add_value_order_id_detail"])
def artemis_ad_packageorder_detail(self, package_order_id):
"我的服务订单-已支付广告包"
self.params["package_order_id"] = package_order_id
return self.api_send(self.SERVICE_URL["artemis_ad_packageorder_detail"])
def artemis_cpc_categorypromotemanage_list(self, promote_flag,id):
"点点通商品-品类推广管理"
self.params["promote_flag"] = promote_flag
......@@ -67,6 +70,14 @@ class web2_request(BaseRequest):
self.params["flag_relation"] = flag_relation
return self.api_send(self.SERVICE_URL["artemis_cpc_category_query"])
def artemis_cpc_category_service_ids(self, page, pagesize, is_online, category_id):
"品类推广管理-新增推广品类-关联美购"
self.params["page"] = page
self.params["pagesize"] = pagesize
self.params["is_online"] = is_online
self.params["category_id"] = category_id
return self.api_send(self.SERVICE_URL["artemis_cpc_category_service_ids"])
if __name__ == '__main__':
print(web2_request().service_list("1", "10", "-1", "-1"))
......@@ -80,4 +91,5 @@ if __name__ == '__main__':
print(web2_request().artemis_ad_packageorder_detail("685529883901"))
print(web2_request().artemis_cpc_categorypromotemanage_list(-1,-1))
print(web2_request().artemis_cpc_category_query("wangyang", 0))
print(web2_request().artemis_cpc_category_service_ids(1, 10, -1, 8))
......@@ -109,4 +109,16 @@ artemis_cpc_category_query:
flag_relation: ${flag_relation}
data: {}
json: {}
isLogin: 1 #需要登录
artemis_cpc_category_service_ids:
method: get
url: /api/web2/artemis/cpc/category/service_ids
params:
page: ${page}
pagesize: ${pagesize}
is_online: ${is_online}
category_id: ${category_id}
data: {}
json: {}
isLogin: 1 #需要登录
\ No newline at end of file
......@@ -485,6 +485,8 @@ CPCCOMMUNITYCLICKLOGS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_
CPCCATEGORYPROMOTEMANAGELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_categorypromotemanage_list.yaml")
#医生后台-点点通商品-品类推广管理-新增推广品类
CPCCATEGORYQUERY=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_category_query.yaml")
#医生后台-点点通商品-品类推广管理-新增推广品类-关联美购
CPCCATEGORYSERVICEIDS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_data", "artemis_cpc_category_service_ids.yaml")
......@@ -619,6 +621,14 @@ ADDLIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_li
POP_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
POP_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "pop_service.yaml")
#OM后台-弹出美券
POP_GIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
POP_GIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "pop_gift.yaml")
#用户-领取美券
GET_GIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
GET_GIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "get_gift.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")
......@@ -703,5 +713,18 @@ FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data
#直播-新增标签
TAG_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "tag_request.yaml")
TAG_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tag_data", "tag_add.yaml")
#我的-收藏-帖子
FAVORS_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_tractate.yaml")
#我的-收藏-帖子
FAVORS_ANSWERS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_ANASWERS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_answers.yaml")
#我的-头像点击
ACCOUNT_HOMEPAGE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "account_request.yaml")
ACCOUNT_HOMEPAGE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data", "account_homepage.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
\ No newline at end of file
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
class TestAccount_Homepage:
data = BaseRequest().api_load(path_setting.ACCOUNT_HOMEPAGE)
account_homepage_case, account_homepage_data = get_ids(data, "account_homepage")
@pytest.mark.parametrize("param", account_homepage_data, ids=account_homepage_case)
def test_account_homepage(self, param):
r = account_request().account_homepage(param["user_id"], param["device_id"])
assert r["error"] == param["assert"]
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 TestGetGift:
data = BaseRequest().api_load(path_setting.GET_GIFT)
get_gift_case, get_gift_data = get_ids(data, "get_gift")
@pytest.mark.parametrize("param", get_gift_data, ids=get_gift_case)
def test_get_gift(self,param):
r = live_request().get_gift(param["gift_id"], param["version"])
if r["message"] == "领取成功!":
print("用户成功领取美券~")
assert r["data"]["has_gift_left"] == param["assert"]
else:
print("出错了!!!")
\ 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 TestPopGift:
data = BaseRequest().api_load(path_setting.POP_GIFT)
pop_gift_case, pop_gift_data = get_ids(data, "pop_gift")
@pytest.mark.parametrize("param", pop_gift_data, ids=pop_gift_case)
def test_pop_gift(self,param):
r = live_request().pop_gift(param["stream_id"], param["gift_id"], param["version"])
if r["data"] is not None:
print("成功弹出美券")
assert r["data"]["gift_id"] == param["assert"]
else:
print("出错了!!!")
\ No newline at end of file
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 TestFavorsAnswers:
data = BaseRequest().api_load(path_setting.FAVORS_ANASWERS)
favors_answers_case, favors_answers_data = get_ids(data, "favors_answers")
@pytest.mark.parametrize("param", favors_answers_data, ids=favors_answers_case)
def test_favors_answers(self, param):
r = user_request().favors_answers(param["page"], param["count"])
assert r["error"] == 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 TestFavorsTractate:
data = BaseRequest().api_load(path_setting.FAVORS_TRACTATE)
favors_tractate_case, favors_tractate_data = get_ids(data, "favors_tractate")
@pytest.mark.parametrize("param", favors_tractate_data, ids=favors_tractate_case)
def test_favors_tractate(self, param):
r = user_request().favors_tractate(param["page"], param["count"])
assert r["error"] == param["assert"]
account_homepage:
#我的-头像点击
-
case: "我的页面-头像点击"
user_id: 33910245
device_id: androidid_16a95f3fa31a4c0b
assert: 0
get_gift:
#用户-领取美券
-
case: "用户-领取美券"
gift_id: "59124"
version : "7.46.0"
assert: 1
\ No newline at end of file
pop_gift:
#在om后台添加美券后,点击弹出,直播间弹出美券
-
case: "在om后台添加美券后,点击弹出,直播间弹出美券"
stream_id: "4271"
gift_id: "59124"
version : "7.46.0"
assert: 59124
\ No newline at end of file
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-07-28 19:16:19
content: ces测试+2021-07-30 15:42:50
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
favors_answers:
#我的-收藏-回答
-
case: "我的页面-收藏-回答"
page: 1
count: 10
assert: 0
favors_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 TestArtemisCpcCategoryServiceIds:
data = BaseRequest().api_load(path_setting.CPCCATEGORYSERVICEIDS)
cpccategoryserviceids_case, cpccategoryserviceids_data = get_ids(data, "artemis_cpc_category_service_ids")
@pytest.mark.parametrize("param",cpccategoryserviceids_data,ids=cpccategoryserviceids_case)
def test_artemis_cpc_category_service_ids(self, param):
'''点点通商品-品类推广管理-新增品类推广-关联美购'''
r = web2_request().artemis_cpc_category_service_ids(param["page"], param["pagesize"], param["is_online"], param["category_id"])
print(r)
if r["error"] == 0:
assert r["data"]["services"][0]["is_online"] == param["assert"]
artemis_cpc_category_service_ids:
#点点通商品-品类推广管理
-
case: "点点通商品-品类推广-关联美购-美购状态为已下线"
page: 1
pagesize: 10
is_online: -1
category_id: 8
assert: False
-
case: "点点通商品-品类推广-关联美购-美购状态为已上线"
page: 1
pagesize: 10
is_online: -1
category_id: 22
assert: 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