Commit 6292c508 authored by aha's avatar aha

主播标记商品/取消标记

parent 9cc43660
......@@ -11,6 +11,7 @@ class live_request(BaseRequest):
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)
self.data = self.api_load(path_setting.MARK_LIVE_SERVICE_CONFIG)
#主播-推荐袋美购列表展示
def live_services(self, channel_id, stream_id, offset, size):
......@@ -80,9 +81,19 @@ class live_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["m_get_channel_status"])
#主播标记讲解商品+取消标记
def mark_live_service(self, stream_id, channel_id, live_service_id, mark_status, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id
self.params["channel_id"] = channel_id
self.params["live_service_id"] = live_service_id
self.params["mark_status"] = mark_status
self.params["version"] = version
return self.api_send(self.data["mark_live_service"])
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"))
print(live_request().m_get_channel_status("745", "7.46.0"))
\ No newline at end of file
#print(live_request().m_get_channel_status("745", "7.46.0"))
print(live_request().mark_live_service("4233", "745", "7269", "1", "746.0"))
\ No newline at end of file
......@@ -89,4 +89,18 @@ m_get_channel_status:
json: {}
isLogin: 1
#主播标记讲解商品+取消标记
mark_live_service:
method: POST
url: /api/janus/live/mark_live_service
params:
version: ${version}
data:
stream_id: ${stream_id}
channel_id: ${channel_id}
live_service_id: ${live_service_id}
mark_status: ${mark_status}
json: {}
isLogin: 1
......@@ -587,6 +587,10 @@ ENTER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "ente
LEAVE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "live_request.yaml")
LEAVE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "leave.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")
#免费招募活动详情
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")
......
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 TestMarkLiveService:
data = BaseRequest().api_load(path_setting.MARK_LIVE_SERVICE)
mark_live_service_case, mark_live_service_data = get_ids(data, "mark_live_service")
@pytest.mark.parametrize("param", mark_live_service_data, ids=mark_live_service_case)
def test_mark_live_service(self, param):
print(111111111111111111111)
r = live_request().mark_live_service(param["stream_id"], param["channel_id"], param["live_service_id"], param["mark_status"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
\ No newline at end of file
mark_live_service:
#主播-主播标记讲解商品
-
case: "主播-主播标记讲解商品"
stream_id: "4233"
channel_id: "745"
live_service_id: "7269"
mark_status: "1"
version: "7.45.0"
assert : 操作成功
#主播-主播取消标记讲解商品
-
case: "主播-主播取消标记讲解商品"
stream_id: "4233"
channel_id: "745"
live_service_id: "7269"
mark_status: "0"
version: "7.45.0"
assert : 操作成功
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