Commit 4c76a2d6 authored by 林颖's avatar 林颖

增加接口签到-其他tab feed

parent ad7def80
import path_setting
from in_common.base_request import BaseRequest
class visual_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.VISUAL_CONFIG)
# 签到--其他tab 美购feed
def service_list(self, unit_id, current_city_id='beijing'):
self.params["unit_id"] = unit_id
self.params["current_city_id"] = current_city_id
return self.api_send(self.data['service_list'])
\ No newline at end of file
#签到--其他tab 美购feed
service_list:
method: GET
url: /api/visual/service_list
params:
#组件id
unit_id : ${unit_id}
current_city_id : ${current_city_id}
data: {}
json: {}
is_Login: 1
......@@ -155,6 +155,11 @@ SIGN_EXCHANGED = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat
# 签到日历
SIGN_CALENDAR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "sign_calendar.yaml")
# 签到--其他 tab feed --也是总的 visual 配置项
VISUAL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "visual_request.yaml")
VISUAL_SERVICE_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/visual_data", "service_list.yaml")
#搜索首页-热门搜索
KEYWORDS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
......
import pytest
import path_setting
from all_backend_api.visual_request import visual_request
from ids_list import get_ids
from in_common.base_request import BaseRequest
class TestServiceList:
data = BaseRequest().api_load(path_setting.VISUAL_SERVICE_LIST)
service_list_case, service_list_data = get_ids(data, "service_list")
#
@pytest.mark.parametrize("param", service_list_data, ids=service_list_case)
def test_service_list(self, param):
r = visual_request().service_list(param["unit_id"])
assert r["error"] == 0
list = r.get("data").get("services",[])
assert len(list) == param["len"]
#签到--其他tab 美购feed
service_list:
-
case: "签到--其他tab 美购feed 校验返回数据数"
assert: 0
len: 10
unit_id: 17923
\ 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