Commit d8415725 authored by 张慧's avatar 张慧

我的订单-各状态订单数量接口

parent ff52eb4c
......@@ -15,8 +15,11 @@ class orders_request(BaseRequest):
return self.api_send(self.data["my_v2"])
#我的订单-各状态订单数量
def my_status(self):
return self.api_send(self.data["my_status"])
if __name__ == '__main__':
print(orders_request().my_v2(0,1,"7.44.0"))
#打印我的订单-各状态订单数量接口返回
print(orders_request().my_status())
......@@ -6,3 +6,12 @@ my_v2:
status: ${status}
version: ${version}
isLogin: 1
#我的订单-各状态订单数量
my_status:
method: get
url: /api/orders/my/status
params: {}
data: {}
json: {}
isLogin: 1
......@@ -158,8 +158,8 @@ JANUS_PRODUCT_MY_LIST_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_d
ORDERS_MY_V2_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "orders_request.yaml")
# 订单列表
ORDERS_MY_V2_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/orders_data", "my_v2.yaml")
#我的订单-各状态订单数量
ORDER_MY_STATUS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/orders_data", "my_status.yaml")
LOGIN_PASSWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/accounts_data", "login_passwd.yaml")
LOGIN_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "accounts_request.yaml")
......
import pytest
from all_backend_api.orders_request import orders_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestMyStatus:
data = BaseRequest().api_load(path_setting.ORDER_MY_STATUS)
my_status_case, my_status_data = get_ids(data, "my_status")
@pytest.mark.parametrize("param", my_status_data, ids=my_status_case)
def test_my_status(self, param):
r = orders_request().my_status()
if r["error"] == 0:
assert r["error"] == param["assert_error"]
my_status:
-
case: "我的订单-各状态订单数量-接口调用成功case"
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