Commit 8b57e135 authored by 张慧's avatar 张慧

商祥页-收藏接口

parent c1b00524
......@@ -11,6 +11,13 @@ class service_request(BaseRequest):
return self.api_send(self.data["home_v5"])
#商祥页-收藏
def service_favor(self):
return self.api_send(self.data["service_favor"])
if __name__ == '__main__':
print(service_request().home_v5())
\ No newline at end of file
print(service_request().home_v5())
#打印商祥页-收藏接口返回
print(service_request().service_favor())
\ No newline at end of file
......@@ -6,3 +6,13 @@ home_v5:
data: {}
json: {}
#商祥页-收藏
service_favor:
method: post
url: /api/service/favor/5857263/
params: {}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -129,6 +129,8 @@ UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_dat
JANUS_PRODUCT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "product_detail.yaml")
#商祥页-sku信息
JANUS_SKU_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "sku_info.yaml")
#商祥页-收藏
SERVICE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/service_data", "service_favor.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
import pytest
from all_backend_api.service_request import service_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestServiceFavor:
data = BaseRequest().api_load(path_setting.SERVICE_FAVOR)
service_favor_case, service_favor_data = get_ids(data, "service_favor")
@pytest.mark.parametrize("param", service_favor_data, ids=service_favor_case)
def test_service_favor(self, param):
r = service_request().service_favor()
if r["error"] == 0:
assert r["message"] == param["assert_message"]
print(service_request().service_favor())
service_favor:
-
case: "校验收藏成功case"
assert_message: "收藏成功"
\ 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