Commit ced6a741 authored by aha's avatar aha

首页-(仅校验)品类聚合页模块icon:/api/janus/product/home_page/resource_bit …

首页-(仅校验)品类聚合页模块icon:/api/janus/product/home_page/resource_bit     品类聚合页-社区/视频列表:/api/polymerization/content
parent 305c886b
......@@ -280,6 +280,12 @@ class janus_request(BaseRequest):
self.params["version"] = version
return self.api_send(self.data["commodity_rank"])
#首页-品类聚合页icon
def resource_bit(self, current_city_id, version, device_id='8C3EB981-B22D-43E2-B208-34F6036505BB'):
self.params["current_city_id"] = current_city_id
self.params["version"] = version
return self.api_send(self.data["resource_bit"])
......
......@@ -380,4 +380,14 @@ commodity_rank:
commodity_rank_id: ${commodity_rank_id}
version: ${version}
data: {}
json: {}
\ No newline at end of file
json: {}
#首页-品类聚合页icon
resource_bit:
method: GET
url: /api/janus/product/home_page/resource_bit
params:
current_city_id: ${current_city_id}
version: ${version}
data: {}
json: {}
import path_setting
from in_common.base_request import BaseRequest
class polymerization_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.POLYMERIZATION_REQUEST_CONFIG)
#品类聚合页-社区/视频列表
def polymerization_content(self, tabtype, category_polymer_id, page, tag_ids, operation_id, level, version, device_id='8C3EB981-B22D-43E2-B208-34F6036505BB'):
self.params["tabtype"] = tabtype
self.params["category_polymer_id"] = category_polymer_id
self.params["page"] = page
self.params["tag_ids"] = tag_ids
self.params["operation_id"] = operation_id
self.params["level"] = level
self.params["version"] = version
return self.api_send(self.data["polymerization_content"])
if __name__ == "__main__":
# 品类聚合页-社区/视频列表
print(polymerization_request().polymerization_content("choice", "39", "1", "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]", "85", "3", "7.48.0"))
#品类聚合页-社区/视频列表
polymerization_content:
method: GET
url: /api/polymerization/content
params:
tabtype: ${tabtype}
category_polymer_id: ${category_polymer_id}
page: ${page}
tag_ids: ${tag_ids}
operation_id : ${operation_id}
level: ${level}
version: ${version}
data: {}
json: {}
......@@ -786,6 +786,15 @@ RANK_HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/rank_data
#更麽榜单-医生榜
RANK_DOCTOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/rank_data", "rank_doctor.yaml")
#首页-品类聚合页icon
RESOURCE_BIT = os.path.join(BASE_DIR,"backend_auto/test_backend_data/janus_data", "resource_bit.yaml")
#品类聚合页-社区/视频列表
POLYMERIZATION_REQUEST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "polymerization_request.yaml")
POLYMERIZATION_CONTENT = os.path.join(BASE_DIR,"backend_auto/test_backend_data/polymerization_data", "polymerization_content.yaml")
......
import pytest
import path_setting
from all_backend_api.janus_request import janus_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestResourceBit:
data = BaseRequest().api_load(path_setting.RESOURCE_BIT)
resource_bit_case, resource_bit_data = get_ids(data, "resource_bit")
@pytest.mark.parametrize("param", resource_bit_data, ids=resource_bit_case)
def test_resource_bit(self,param):
r = janus_request().resource_bit(param["current_city_id"], param["version"])
if r["error"] ==0:
assert r["data"]["pro_category"][0]["exposure"]["card_type"] == param["assert"]
print("首页-品类聚合页icon接口正常哦")
else:
assert r["error"] == 99
print("接口出错了")
\ No newline at end of file
import pytest
import path_setting
from all_backend_api.polymerization_request import polymerization_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestPolymerizationContent:
data = BaseRequest().api_load(path_setting.POLYMERIZATION_CONTENT)
polymerizaiton_content_case, polymerizaiton_content_data = get_ids(data, "polymerization_content")
@pytest.mark.parametrize("param", polymerizaiton_content_data, ids=polymerizaiton_content_case)
def test_polymerization_content(self,param):
r = polymerization_request().polymerization_content(param["tabtype"], param["category_polymer_id"], param["page"], param["tag_ids"], param["operation_id"], param["level"], param["version"])
if r["error"] == 0:
assert len(r["data"]["features"]) != param["assert"]
# assert r["data"]["features"][0]["diary"]["tags"][0]["tag_id"] == param["operation_id"]
print("品类聚合页-社区/视频列表接口已通哦")
else:
assert r["error"] == 99
print("接口出错了")
\ No newline at end of file
resource_bit:
#首页-品类聚合页icon接口正常哦
-
case: "首页-品类聚合页icon接口正常哦"
current_city_id: beijing
version: 748.0
assert: icon
\ No newline at end of file
polymerization_content:
#品类聚合页-眼部整形-推荐-全部tab-社区列表
-
case: "品类聚合页-眼部整形-推荐-全部tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 12
level: 1
version: 748.0
assert: 0
#品类聚合页-眼部整形-推荐-全部tab-视频列表
-
case: "品类聚合页-眼部整形-推荐-全部tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 12
level: 1
version: 748.0
assert: 0
#品类聚合页-眼部整形-推荐-切开双眼皮tab-社区列表
-
case: "品类聚合页-眼部整形-推荐-切开双眼皮tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 85
level: 3
version: 748.0
assert: 0
#品类聚合页-眼部整形-推荐-切开双眼皮tab-视频列表
-
case: "品类聚合页-眼部整形-推荐-切开双眼皮tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 85
level: 3
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-全部tab-社区列表
-
case: "品类聚合页-眼部整形-双眼皮-全部tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 13
level: 2
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-全部tab-视频列表
-
case: "品类聚合页-眼部整形-双眼皮-全部tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 13
level: 2
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-社区列表
-
case: "品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-社区列表"
tabtype: choice
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 86
level: 3
version: 748.0
assert: 0
#品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-视频列表
-
case: "品类聚合页-眼部整形-双眼皮-埋线双眼皮tab-视频列表"
tabtype: home_video
category_polymer_id: 39
page: 1
tag_ids: "[3239, 3242, 3243, 3245, 3246, 3247, 3248, 3275, 3277, 3278, 3279, 3289, 3309]"
operation_id: 86
level: 3
version: 748.0
assert: 0
\ 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