Commit 8a791c22 authored by aha's avatar aha

主播添加商品后,购物车上方弹出商品卡片

parent 18af6ea7
......@@ -8,6 +8,7 @@ class live_request(BaseRequest):
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.POP_SERVICE_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)
......@@ -59,6 +60,14 @@ class live_request(BaseRequest):
self.params["version"] = version
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'):
self.params["channel_id"] = channel_id
......@@ -108,5 +117,6 @@ if __name__ == '__main__':
# 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"))
print(live_request().mark_live_service("4233", "745", "7269", "1", "746.0"))
print(live_request().audience_services("4179","739","0","20"))
\ No newline at end of file
# 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
......@@ -52,6 +52,19 @@ add_live_service:
json: {}
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:
method: POST
......
......@@ -598,6 +598,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 = 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 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_service.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 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
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
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