Commit c0f0da5d authored by 林颖's avatar 林颖

Merge branch 'common_dev' of http://git.wanmeizhensuo.com/dengyingying/backend_auto into common_dev

parents 87849717 b23d501d
...@@ -8,6 +8,7 @@ class live_request(BaseRequest): ...@@ -8,6 +8,7 @@ class live_request(BaseRequest):
self.data = self.api_load(path_setting.LIVEGIFTS_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.SEARCHSERVICE_CONFIG)
self.data = self.api_load(path_setting.ADDLIVESERVICE_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.DELETELIVESERVICE_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.DELETEGIFT_CONFIG)
self.data = self.api_load(path_setting.M_GET_CHANNEL_STATUS_CONFIG) self.data = self.api_load(path_setting.M_GET_CHANNEL_STATUS_CONFIG)
...@@ -59,6 +60,14 @@ class live_request(BaseRequest): ...@@ -59,6 +60,14 @@ class live_request(BaseRequest):
self.params["version"] = version self.params["version"] = version
return self.api_send(self.data["add_live_service"]) return self.api_send(self.data["add_live_service"])
#主播-添加商品后,购物车上方弹出商品卡片
def pop_service(self, stream_id, live_service_id, pop_type, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id
self.params["live_service_id"] = live_service_id
self.params["pop_type"] = pop_type
self.params["version"] = version
return self.api_send(self.data["pop_service"])
#主播-推荐袋删除商品 #主播-推荐袋删除商品
def delete_live_service(self, channel_id, live_service_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'): 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["channel_id"] = channel_id
...@@ -90,10 +99,24 @@ class live_request(BaseRequest): ...@@ -90,10 +99,24 @@ class live_request(BaseRequest):
self.params["version"] = version self.params["version"] = version
return self.api_send(self.data["mark_live_service"]) return self.api_send(self.data["mark_live_service"])
#直播-观众打开购物袋
def audience_services(self, stream_id,channel_id,offset,size):
self.params["stream_id"] = stream_id
self.params["channel_id"] = channel_id
self.params["offset"] = offset
self.params["size"] = size
return self.api_send(self.data["audience_services"])
#观众点击直播内美购跳转详情页
def service_page_live_enter(self,service_id):
self.params["service_id"] = service_id
return self.api_send(self.data["service_page_live_enter"])
if __name__ == '__main__': if __name__ == '__main__':
# print(live_request().live_services("745", "4177", "0", "10")) # print(live_request().live_services("745", "4177", "0", "10"))
# print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0")) # 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().add_live_service("745", "560641", "7.45.0"))
# print(live_request().delete_live_service("745", "7242", "7.45.0")) # print(live_request().delete_live_service("745", "7242", "7.45.0"))
#print(live_request().m_get_channel_status("745", "7.46.0")) #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().mark_live_service("4233", "745", "7269", "1", "746.0"))
\ No newline at end of file # 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
...@@ -52,6 +52,19 @@ add_live_service: ...@@ -52,6 +52,19 @@ add_live_service:
json: {} json: {}
isLogin: 1 isLogin: 1
#主播-添加商品后,购物车上方弹出商品卡片
pop_service:
method: GET
url: /api/janus/live/pop_service
params:
stream_id: ${stream_id}
live_service_id: ${live_service_id}
pop_type: ${pop_type}
version: ${version}
data: {}
json: { }
isLogin: 1
#主播-推荐袋删除商品 #主播-推荐袋删除商品
delete_live_service: delete_live_service:
method: POST method: POST
...@@ -103,4 +116,23 @@ mark_live_service: ...@@ -103,4 +116,23 @@ mark_live_service:
json: {} json: {}
isLogin: 1 isLogin: 1
#直播-观众打开购物袋
audience_services:
method: get
url: /api/janus/live/audience_services
params:
stream_id: ${stream_id}
channel_id: ${channel_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
#观众点击直播内美购
service_page_live_enter:
method: get
url: /api/janus/live/service_page_live_enter
params:
service_id: ${service_id}
data: {}
json: {}
\ No newline at end of file
...@@ -605,6 +605,10 @@ SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_ ...@@ -605,6 +605,10 @@ SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_
ADDLIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.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") ADDLIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "add_live_service.yaml")
#主播-添加商品后,购物车上方弹出商品卡片
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")
#主播-推荐袋删除商品 #主播-推荐袋删除商品
DELETELIVESERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.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") DELETELIVESERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_service.yaml")
...@@ -632,6 +636,10 @@ FINISH = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "fin ...@@ -632,6 +636,10 @@ FINISH = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "fin
#主播标记讲解商品+取消标记 #主播标记讲解商品+取消标记
MARK_LIVE_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml") MARK_LIVE_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
MARK_LIVE_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "mark_live_service.yaml") MARK_LIVE_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "mark_live_service.yaml")
#直播-观众打开购物袋
AUDIENCE_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "audience_services.yaml")
#直播-用户点击直播间美购
SERVICE_PAGE_LIVE_ENTER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "service_page_live_enter.yaml")
#主播-分享按钮的点击 #主播-分享按钮的点击
GET_LIVE_INFO_AUDIENCE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml") GET_LIVE_INFO_AUDIENCE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
...@@ -686,4 +694,4 @@ FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data ...@@ -686,4 +694,4 @@ 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_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") TAG_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tag_data", "tag_add.yaml")
if __name__ == '__main__': if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG) print("==========",LIVEYAML_CONFIG)
\ No newline at end of file
import pytest
from ids_list import get_ids
import path_setting
from all_backend_api.janus_live_request import live_request
from in_common.base_request import BaseRequest
class TestServicePageLiveEnter:
data = BaseRequest().api_load(path_setting.SERVICE_PAGE_LIVE_ENTER)
service_page_live_enter_case, service_page_live_enter_data = get_ids(data, "service_page_live_enter")
@pytest.mark.parametrize("param",service_page_live_enter_data, ids=service_page_live_enter_case)
def test_service_page_live_enter(self,param):
r = live_request().service_page_live_enter(param["service_id"])
if r["error"] == 0:
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.janus_live_request import live_request
class TestAudienceServices:
data = BaseRequest().api_load(path_setting.AUDIENCE_SERVICES)
audience_services_case, audience_services_data = get_ids(data, "audience_services")
@pytest.mark.parametrize("param",audience_services_data, ids = audience_services_case)
def test_audience_services(self,param):
r = live_request().audience_services(param["stream_id"],param["channel_id"],param["offset"],param["size"])
if r["error"] == 0:
assert r["error"] == 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 TestPopService:
data = BaseRequest().api_load(path_setting.POP_SERVICE)
pop_service_case, pop_service_data = get_ids(data, "pop_service")
@pytest.mark.parametrize("param", pop_service_data, ids=pop_service_case)
def test_pop_service(self,param):
r = live_request().pop_service(param["stream_id"], param["live_service_id"], param["pop_type"], param["version"])
if r["error"] == 0:
print("成功弹出商品卡片")
assert r["data"]["live_service_id"] == param["assert"]
else:
print("出错了!!!")
\ No newline at end of file
hospital_search: hospital_search:
#北京画美医院主页
- -
#医院主页搜索---搜索成功,有数据召回 #医院主页搜索---搜索成功,有数据召回
case: "医院主页搜索---搜索成功,当前搜索词召回的对应商品不少于5个,不展示热卖推荐商品" case: "医院主页搜索---搜索成功,当前搜索词召回的对应商品不少于5个,不展示热卖推荐商品"
query: "玻尿酸" query: "玻尿酸"
device_id: "1321222222222222135" device_id: "1321222222222222135"
hospital_id: "96ea37eef81d11e692f800163e000a4a" hospital_id: "fb38be6e52b34b6d8efe7a30d2c93022"
current_city_id: "beijing" current_city_id: "beijing"
version: "742.2" version: "742.2"
offset: "0" offset: "0"
size: "10" size: "10"
assert1: 0 assert1: 5
assert2: 0 assert2: 0
- -
...@@ -17,7 +18,7 @@ hospital_search: ...@@ -17,7 +18,7 @@ hospital_search:
case: "医院主页搜索---搜索成功,当前搜索词下无对应商品,召回热卖推荐商品" case: "医院主页搜索---搜索成功,当前搜索词下无对应商品,召回热卖推荐商品"
query: "美白针" query: "美白针"
device_id: "1321222222222222135" device_id: "1321222222222222135"
hospital_id: "96ea37eef81d11e692f800163e000a4a" hospital_id: "fb38be6e52b34b6d8efe7a30d2c93022"
current_city_id: "beijing" current_city_id: "beijing"
version: "742.2" version: "742.2"
offset: "0" offset: "0"
...@@ -30,7 +31,7 @@ hospital_search: ...@@ -30,7 +31,7 @@ hospital_search:
case: "医院主页搜索---搜索成功,当前搜索词召回的对应商品少于5个,展示热卖推荐商品" case: "医院主页搜索---搜索成功,当前搜索词召回的对应商品少于5个,展示热卖推荐商品"
query: "瘦脸针" query: "瘦脸针"
device_id: "1321222222222222135" device_id: "1321222222222222135"
hospital_id: "96ea37eef81d11e692f800163e000a4a" hospital_id: "fb38be6e52b34b6d8efe7a30d2c93022"
current_city_id: "beijing" current_city_id: "beijing"
version: "742.2" version: "742.2"
offset: "0" offset: "0"
......
audience_services:
-
case: "直播-观众打开购物袋"
url: /api/janus/live/audience_services
stream_id: 4116
channel_id: 739
offset: 0
size: 20
assert: 0
-
case: "直播-购物袋第二页"
url: /api/janus/live/audience_services
stream_id: 4116
channel_id: 739
offset: 20
size: 20
assert: 0
\ No newline at end of file
pop_service:
#主播添加商品后,购物车上方成功弹出一个商品卡片
-
case: "主播添加商品后,购物车上方成功弹出一个商品卡片"
stream_id: "4266"
live_service_id: "7324"
pop_type: "1"
version : "7.46.0"
assert: 7324
\ No newline at end of file
service_page_live_enter:
-
case: "用户点击直播间商品卡片"
url: /api/janus/live/audience_services
service_id: "5885090"
assert: 0
\ No newline at end of file
...@@ -3,7 +3,7 @@ reply_create: ...@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变' beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验 case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan channel: benzhan
content: ces测试+2021-07-22 18:42:59 content: ces测试+2021-07-28 19:16:19
message: 请勿回复重复内容 message: 请勿回复重复内容
message1: 回复成功 message1: 回复成功
message2: 你的回复有点频繁,稍后再来 message2: 你的回复有点频繁,稍后再来
......
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