Commit aae50c03 authored by 冯艮霞's avatar 冯艮霞

解决冲突

parents 1c48469c 4e6b9388
...@@ -7,6 +7,10 @@ class janus_request(BaseRequest): ...@@ -7,6 +7,10 @@ class janus_request(BaseRequest):
self.data = self.api_load(path_setting.CONTENTV7_CONFIG) self.data = self.api_load(path_setting.CONTENTV7_CONFIG)
self.data = self.api_load(path_setting.HOSPITALSEARCH_CONFIG) self.data = self.api_load(path_setting.HOSPITALSEARCH_CONFIG)
#品类聚合页面商品列表
self.data = self.api_load(path_setting.TAG_SERVICE_CONFIG)
#搜索结果页-综合/百科tab #搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset): def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词 #搜索词
...@@ -47,9 +51,26 @@ class janus_request(BaseRequest): ...@@ -47,9 +51,26 @@ class janus_request(BaseRequest):
def mine_guess_you_like(self): def mine_guess_you_like(self):
return self.api_send(self.data["mine_guess_you_like"]) return self.api_send(self.data["mine_guess_you_like"])
# 品类聚合页面商品列表
def tag_service(self, size, tag_ids, offset, tag_id, version, device_id):
print("fgx")
self.params['size'] = size
self.params['tag_ids'] = tag_ids
self.params['offset'] = offset
self.params['tag_id'] = tag_id
self.params['version'] = version
self.params['device_id'] = device_id
return self.api_send(self.data["tag_service"])
if __name__ == '__main__': if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回 #打印购物车-猜你喜欢列表接口返回
print(janus_request().mine_guess_you_like()) print(janus_request().mine_guess_you_like())
#品类聚合页面商品列表接口返回
print(janus_request().tag_service())
print("fgx")
...@@ -36,6 +36,21 @@ mine_guess_you_like: ...@@ -36,6 +36,21 @@ mine_guess_you_like:
json: {} json: {}
isLogin: 1 isLogin: 1
#品类聚合页面商品列表的
tag_service:
method: GET
url: /api/janus/product/tag_service
params:
size: ${size}
tag_ids: ${tag_ids}
offset: ${offset}
tag_id: ${tag_id}
version: ${version}
device_id: ${device_id}
data: { }
json: { }
......
...@@ -130,5 +130,9 @@ UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_dat ...@@ -130,5 +130,9 @@ UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_dat
READALL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_data", "readall.yaml") READALL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_data", "readall.yaml")
#品类聚合页面商品列表
TAG_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
TAG_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "tag_service.yaml")
if __name__ == '__main__': if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG) print("==========",LIVEYAML_CONFIG)
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_request import janus_request
class TestTagService:
data = BaseRequest().api_load(path_setting.TAG_SERVICE)
tagservice_case, tagservice_data = get_ids(data, "tag_service")
@pytest.mark.parametrize("param", tagservice_data, ids=tagservice_case)
def test_tag_service(self, param):
r = janus_request().tag_service(param["size"], param["tag_ids"], param["offset"], param["tag_id"], param["version"], param["device_id"])
#print('feng=', r)
if r["error"] == 0:
assert r["error"] == param["assert"]
assert r["data"]["offset"] == param["offset"]
tag_service:
#品类聚合页面商品
-
case: "品类聚合页面商品列表"
assert: 0
size: 10
tag_ids: []
offset: 0
tag_id:
version: 7.43.0
device_id: 869378034450718
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