Commit dfd5d83f authored by aha's avatar aha

Merge branch 'cuixin_dev' into common_dev

parents be7a8551 5ea5a5f8
import path_setting
from in_common.base_request import BaseRequest
class live_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.LIVESERVICES_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.ADDLIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETELIVESERVICE_CONFIG)
self.data = self.api_load(path_setting.DELETEGIFT_CONFIG)
#主播-推荐袋美购列表展示
def live_services(self, channel_id, stream_id, offset, size):
self.params["channel_id"] = channel_id
self.params["stream_id"] = stream_id
self.params["offset"] = offset
self.params["size"] = size
return self.api_send(self.data["live_services"])
#主播-推荐袋美券列表展示
def live_gifts(self, channel_id, gift_type, stream_id, offset, size):
self.params["channel_id"] = channel_id
self.params["gift_type"] = gift_type
self.params["stream_id"] = stream_id
self.params["offset"] = offset
self.params["size"] = size
return self.api_send(self.data["live_gifts"])
#主播-推荐袋商品捜索功能
def search_service(self, current_city_id, channel_id, query, offset, size, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["current_city_id"] = current_city_id
self.params["channel_id"] = channel_id
self.params["query"] = query
self.params["offset"] = offset
self.params["size"] = size
self.params["version"] = version
return self.api_send(self.data["search_service"])
#主播-推荐袋美券捜索功能
def search_gifts(self, current_city_id, channel_id, gift_type, offset, size, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["current_city_id"] = current_city_id
self.params["channel_id"] = channel_id
self.params["gift_type"] = gift_type
self.params["offset"] = offset
self.params["size"] = size
self.params["version"] = version
return self.api_send(self.data["search_gifts"])
#主播-推荐袋添加商品
def add_live_service(self, channel_id, service_item_ids, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["service_item_ids"] = service_item_ids
self.params["version"] = version
return self.api_send(self.data["add_live_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
self.params["live_service_id"] = live_service_id
self.params["version"] = version
return self.api_send(self.data["delete_live_service"])
#主播-推荐袋删除美券
def delete_live_gift(self, channel_id, gift_id, gift_type, stream_id, version, device_id='97B6764B-2135-4761-9911-701C38CBC272'):
self.params["channel_id"] = channel_id
self.params["gift_id"] = gift_id
self.params["gift_type"] = gift_type
self.params["stream_id"] = stream_id
self.params["version"] = version
return self.api_send(self.data["delete_live_gift"])
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"))
\ No newline at end of file
#主播-推荐袋美购列表展示
live_services:
method: GET
url: /api/janus/live/live_services
params:
channel_id: ${channel_id}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋美券列表展示
live_gifts:
method: GET
url: /api/janus/live/live_gifts
params:
channel_id: ${channel_id}
gift_type: ${gift_type}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋商品捜索功能
search_service:
method: GET
url: /api/janus/live/search_service
params:
current_city_id: ${current_city_id}
channel_id: ${channel_id}
query: ${query}
offset: ${offset}
size: ${size}
version: ${version}
data: {}
json: {}
isLogin: 1
#主播-推荐袋添加商品
add_live_service:
method: POST
url: /api/janus/live/add_live_service
params:
version: ${version}
data:
channel_id: ${channel_id}
service_item_ids: ${service_item_ids}
json: {}
isLogin: 1
#主播-推荐袋删除商品
delete_live_service:
method: POST
url: /api/janus/live/delete_live_service
params:
version: ${version}
data:
channel_id: ${channel_id}
live_service_id: ${live_service_id}
json: {}
isLogin: 1
#主播-推荐袋删除美券
delete_live_gift:
method: POST
url: /api/janus/live/delete_live_gift
params:
version: ${version}
data:
channel_id: ${channel_id}
gift_id: ${gift_id}
gift_type: ${gift_type}
stream_id: ${stream_id}
json: {}
isLogin: 1
......@@ -22,6 +22,7 @@ class living_request(BaseRequest):
return self.api_send(self.data["pushlive_info"])
if __name__ == '__main__':
(living_request().danmu_v2("739", "1"))
(living_request().pushlive_info("小冤家", "2021/04/22/1003/cef471cff5e6", "", "1", "1", "1"))
\ No newline at end of file
......@@ -24,3 +24,32 @@ pushlive_info:
json: {}
isLogin: 1
#主播-推荐袋美购列表展示
live_services:
method: GET
url: /api/janus/live/live_services
params:
channel_id: ${channel_id}
stream_id: ${stream_id}
offset: ${offset}
size: ${size}
data: {}
json: {}
isLogin: 1
#主播-推荐袋商品捜索功能
search_services:
method: GET
url: /api/janus/live/search_services
params:
current_city_id: ${current_city_id}
channel_id: ${channel_id}
query: ${query}
offset: ${offset}
size: ${size}
trace_id: ${trace_id}
data: {}
json: {}
isLogin: 1
......@@ -3,3 +3,4 @@ develop_host:
om: http://om.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend_online: https://backend.igengmei.com
......@@ -528,6 +528,35 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
PAGE_RULES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
PAGE_RULES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "page_rules.yaml")
#主播-推荐袋美购列表展示
LIVESERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
LIVESERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "live_services.yaml")
#主播-推荐袋美券列表展示
LIVEGIFTS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
LIVEGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "live_gifts.yaml")
#主播-推荐袋商品搜索功能
SEARCHSERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
SEARCHSERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "search_service.yaml")
#主播-推荐袋美券搜索功能
SEARCHGIFTS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "search_gifts.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")
#主播-推荐袋删除商品
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")
#主播-推荐袋删除美券
DELETEGIFT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_live_request.yaml")
DELETEGIFT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_data", "delete_live_gift.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")
......@@ -548,5 +577,6 @@ MY_DIARY_V2 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data",
USER_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "user_tractate.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
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 TestAddLiveService:
data = BaseRequest().api_load(path_setting.ADDLIVESERVICE)
addliveservice_case, addliveservice_data = get_ids(data, "add_live_service")
@pytest.mark.parametrize("param", addliveservice_data, ids=addliveservice_case)
def test_add_live_service(self, param):
print(111111111111111111111)
r = live_request().add_live_service(param["channel_id"], param["service_item_ids"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == 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 TestDeleteLiveGift:
data = BaseRequest().api_load(path_setting.DELETEGIFT)
deletelivegift_case, deletelivegift_data = get_ids(data, "delete_live_gift")
@pytest.mark.parametrize("param", deletelivegift_data, ids=deletelivegift_case)
def test_delete_live_gift(self, param):
print(111111111111111111111)
r = live_request().delete_live_gift(param["channel_id"], param["gift_id"], param["stream_id"], param["gift_type"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == 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 TestDeleteLiveService:
data = BaseRequest().api_load(path_setting.DELETELIVESERVICE)
deleteliveservice_case, deleteliveservice_data = get_ids(data, "delete_live_service")
@pytest.mark.parametrize("param", deleteliveservice_data, ids=deleteliveservice_case)
def test_delete_live_service(self, param):
print(111111111111111111111)
r = live_request().delete_live_service(param["channel_id"], param["live_service_id"], param["version"])
if r["error"] == 0:
assert r["data"]["toast"] == 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 TestLiveGifts:
data = BaseRequest().api_load(path_setting.LIVEGIFTS)
livegifts_case, livegifts_data = get_ids(data, "live_gifts")
@pytest.mark.parametrize("param", livegifts_data, ids=livegifts_case)
def test_live_gifts(self, param):
print(111111111111111111111)
r = live_request().live_gifts(param["channel_id"], param["gift_type"], param["stream_id"], param["offset"], param["size"])
if r["error"] == 0:
assert r["data"]["offset"] == 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 TestLiveServices:
data = BaseRequest().api_load(path_setting.LIVESERVICES)
liveservices_case, liveservices_data = get_ids(data, "live_services")
@pytest.mark.parametrize("param", liveservices_data, ids=liveservices_case)
def test_live_services(self, param):
print(111111111111111111111)
r = live_request().live_services(param["channel_id"], param["stream_id"], param["offset"], param["size"])
if r["error"] == 0:
assert r["data"]["offset"] == 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 TestSearchService:
data = BaseRequest().api_load(path_setting.SEARCHSERVICE)
searchservice_case, searchservice_data = get_ids(data, "search_service")
@pytest.mark.parametrize("param", searchservice_data, ids=searchservice_case)
def test_search_service(self, param):
print(111111111111111111111)
r = live_request().search_service(param["current_city_id"], param["channel_id"], param["query"], param["offset"], param["size"], param["version"])
if r["error"] == 0:
assert r["data"]["services"] != param["assert"]
\ No newline at end of file
add_live_service:
#主播-推荐袋添加商品-添加一个商品
-
case: "主播-推荐袋添加商品-添加一个商品"
channel_id: "747"
service_item_ids: "560641"
version: "7.45.0"
assert : 成功添加1件商品
#主播-推荐袋添加商品-添加多个商品
-
case: "主播-推荐袋添加商品-添加多个商品"
channel_id: "747"
service_item_ids: "108278,578088,585823"
version: "7.45.0"
assert : 成功添加3件商品
\ No newline at end of file
delete_live_gift:
#主播-推荐袋删除美券-美券成功删除
-
case: "主播-推荐袋删除美券-美券成功删除"
channel_id: "745"
gift_id: "59088"
gift_type: "1"
stream_id: "4207"
version: "7.45.0"
assert : 美券已删除
\ No newline at end of file
delete_live_service:
#主播-推荐袋删除商品-商品成功删除
-
case: "主播-推荐袋删除商品-商品成功删除"
channel_id: "745"
live_service_id: "7251"
version: "7.45.0"
assert : 商品已删除
\ No newline at end of file
live_gifts:
#主播-推荐袋美券列表正常展示
-
case: "主播-推荐袋美券列表正常展示"
channel_id: "745"
gift_type: "3"
stream_id: "4205"
offset: "0"
size: "20"
assert : 0
live_services:
#主播-推荐袋美购列表正常展示
-
case: "主播-推荐袋美购列表正常展示"
channel_id: "746"
stream_id: "4181"
offset: "0"
size: "20"
assert : 20
search_service:
#主播-推荐袋商品搜索功能
-
case: "主播-推荐袋商品搜索功能"
current_city_id: "beijing"
channel_id: "745"
query: ""
offset: "0"
size: "20"
version: "7.45.0"
assert : 0
#主播-推荐袋商品搜索功能-捜索双眼皮
-
case: "主播-推荐袋商品搜索功能-捜索双眼皮"
current_city_id: "beijing"
channel_id: "745"
query: "双眼皮"
offset: "0"
size: "20"
version: "7.45.0"
assert : 0
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-06-28 16:25:25
content: ces测试+2021-07-09 18:49:02
message: 请勿回复重复内容
message1: 回复成功
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