Commit 7363daf8 authored by aha's avatar aha

主播-推荐袋添加尾款券(主播账号为机构或医生)

parent 39c06d5e
......@@ -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.ADDLIVEGIFT_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)
......@@ -70,6 +71,15 @@ class live_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["pop_service"])
#主播-推荐袋添加尾款券(主播账号为机构或医生)
def add_live_gift(self, channel_id, doctor_gift_ids, platform_gift_ids, stream_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["doctor_gift_ids"] = doctor_gift_ids
self.params["platform_gift_ids"] = platform_gift_ids
self.params["stream_id"] = stream_id
self.params["version"] = version
return self.api_send(self.data["add_live_gift"])
#om后台-弹出美券
def pop_gift(self, stream_id, gift_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["stream_id"] = stream_id
......@@ -131,9 +141,11 @@ if __name__ == '__main__':
# 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"))
# 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"))
print(live_request().add_live_gift("739", "59127", "", "4283", "7.45.0"))
print(live_request().delete_live_gift("739", "59127", "1", "4283", "7.45.0"))
# print(live_request().pop_gift("4271", "59124", "746.0"))
print(live_request().get_gift( "59124", "746.0"))
\ No newline at end of file
# print(live_request().get_gift( "59124", "746.0"))
\ No newline at end of file
......@@ -65,6 +65,20 @@ pop_service:
json: {}
isLogin: 1
#主播-推荐袋添加尾款券(主播账号为机构或医生)
add_live_gift:
method: POST
url: /api/janus/live/add_live_gift
params:
version: ${version}
data:
channel_id: ${channel_id}
doctor_gift_ids: ${doctor_gift_ids}
platform_gift_ids: ${platform_gift_ids}
stream_id: ${stream_id}
json: {}
isLogin: 1
#om后台-弹出美券
pop_gift:
method: GET
......
......@@ -615,6 +615,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")
#主播-推荐袋添加尾款券(主播账号为机构或医生)
ADDLIVEGIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
ADDLIVEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "add_live_gift.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")
......
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 TestAddLiveGift:
data = BaseRequest().api_load(path_setting.ADDLIVEGIFT)
addlivegift_case, addlivegift_data = get_ids(data, "add_live_gift")
@pytest.mark.parametrize("param", addlivegift_data, ids=addlivegift_case)
def test_add_live_gift(self, param):
print(111111111111111111111)
r = live_request().add_live_gift(param["channel_id"], param["doctor_gift_ids"], param["platform_gift_ids"], param["stream_id"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == param["assert"]
live_request().delete_live_gift("739", "59127", "1", "4283", "7.45.0")
\ No newline at end of file
add_live_gift:
#主播-推荐袋添加尾款券(主播账号为机构或医生)
-
case: "主播-推荐袋添加尾款券(主播账号为机构或医生),尾款券添加成功"
channel_id: "739"
doctor_gift_ids: "59127"
platform_gift_ids: ""
stream_id: "4283"
version: "7.45.0"
assert : 成功添加1个美券
\ 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