Commit 5ee1c27b authored by 冯艮霞's avatar 冯艮霞

品类聚合页面标签和专场

parent eb5e12d0
......@@ -10,6 +10,8 @@ class janus_request(BaseRequest):
#品类聚合页面商品列表
self.data = self.api_load(path_setting.TAG_SERVICE_CONFIG)
#品类聚合页面标签和专场
self.data = self.api_load(path_setting.POLYMER_CONFIG)
#搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
......@@ -76,6 +78,15 @@ class janus_request(BaseRequest):
return self.api_send(self.data["tag_service"])
# 品类聚合页面标签和专场
def polymer(self, version, category_polymer_id, device_id):
print("fgx")
self.params['version'] = version
self.params['category_polymer_id'] = category_polymer_id
self.params['device_id'] = device_id
return self.api_send(self.data["polymer"])
if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回
......@@ -89,4 +100,8 @@ if __name__ == '__main__':
print(janus_request().tag_service())
print("fgx")
#品类聚合页面标签和专场
print(janus_request().polymer())
print("fgx")
......@@ -72,6 +72,17 @@ tag_service:
json: { }
#品类聚合页标签和专场
polymer:
method: GET
url: /api/janus/product/polymer
params:
version: ${version}
category_polymer_id: ${category_polymer_id}
device_id: ${device_id}
data: { }
json: { }
......
......@@ -150,6 +150,9 @@ CONFIG_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data",
COMMUNITY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
COMMUNITY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "community.yaml")
#品类聚合页面标签和专场
POLYMER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
POLYMER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "polymer.yaml")
if __name__ == '__main__':
......
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 TestPolymer:
data = BaseRequest().api_load(path_setting.POLYMER)
polymer_case, polymer_data = get_ids(data, "polymer")
@pytest.mark.parametrize("param", polymer_data, ids=polymer_case)
def test_polymer(self, param):
r = janus_request().polymer(param["version"], param["category_polymer_id"], param["device_id"])
print('feng=', r)
if r["error"] == 0:
assert r["data"]["id"] == param["assert"]
polymer:
#品类聚合页标签和专场banner
-
case: "品类聚合页面标签和专场banner"
assert: 82
version: 7.43.0
category_polymer_id: 82
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