Commit 888722a0 authored by 邓莹莹's avatar 邓莹莹

Merge branch 'master' into common_dev

parents 306d66f3 cfc3d3ed
import path_setting
from in_common.base_request import BaseRequest
class hybrid_gift_list_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.HYBRID_GIFT_LIST_CONFIG)
#商祥页-美券列表
def gift_list_data(self, service_id, gift_type, page):
self.params["service_id"] = service_id
self.params["gift_type"] = gift_type
self.params["page"] = page
return self.api_send(self.data["gift_list_data"])
if __name__ == '__main__':
#打印商祥页-美券列表接口返回
print(hybrid_gift_list_request().gift_list_data("5857263", 1, 1))
\ No newline at end of file
#商祥页-美券列表
gift_list_data:
method: get
url: /hybrid/gift_list/_data
params:
service_id: ${service_id}
gift_type: ${gift_type}
page: ${page}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -171,6 +171,9 @@ SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "servic
SERVICES_SHARE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/services_data", "share_data.yaml")
#商祥页-加入购物车
SHOPCART_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/shopcart_data", "add.yaml")
#商祥页-美券列表
HYBRID_GIFT_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hybrid_gift_list_request.yaml")
GIFT_LIST_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_gift_list_data", "gift_list_data.yaml")
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
......
import pytest
from all_backend_api.hybrid_gift_list_request import hybrid_gift_list_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestGiftListData:
data = BaseRequest().api_load(path_setting.GIFT_LIST_DATA)
gift_list_data_case, gift_list_data_data = get_ids(data, "gift_list_data")
@pytest.mark.parametrize("param", gift_list_data_data, ids=gift_list_data_case)
def test_gift_list_data(self, param):
r = hybrid_gift_list_request().gift_list_data(param["service_id"], param["gift_type"], param["page"])
if r["error"] == 0:
assert r["error"] == param["assert_error"]
gift_list_data:
-
case: "校验接口返回成功case"
service_id: 5857263
gift_type: 1
page: 1
assert_error: 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