Commit 9c72d5d4 authored by admin's avatar admin

品类聚合页面商品列表

parent 2b702d05
......@@ -7,6 +7,10 @@ class janus_request(BaseRequest):
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.TAG_SERVICE_CONFIG)
#搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词
......@@ -47,9 +51,26 @@ class janus_request(BaseRequest):
def mine_guess_you_like(self):
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__':
#打印购物车-猜你喜欢列表接口返回
print(janus_request().mine_guess_you_like())
#品类聚合页面商品列表接口返回
print(janus_request().tag_service())
print("fgx")
......@@ -36,6 +36,21 @@ mine_guess_you_like:
json: {}
isLogin: 1
#品类聚合页面商品列表的
tag_service:
method: GET
url: /api/janus/product/tag_service
params:
size: 10
tag_ids: []
offset: 0
tag_id:
version: 7.43.0
device_id: 869378034450718
data: { }
json: { }
......
......@@ -127,7 +127,9 @@ AUTO_MSG = os.path.join(BASE_DIR, "backend_auto/test_backend_data/im_data", "aut
UNREAD_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "notification_request.yaml")
UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_data", "unread.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/user_data", "tag_service.yaml")
if __name__ == '__main__':
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
offset: 10
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