Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
d8415725
Commit
d8415725
authored
Jun 15, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的订单-各状态订单数量接口
parent
ff52eb4c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
4 deletions
+39
-4
orders_request.py
all_backend_api/orders_request.py
+5
-2
orders_request.yaml
all_backend_api/orders_request.yaml
+9
-0
path_setting.py
path_setting.py
+2
-2
test_my_status.py
test_backend_case/orders_case/test_my_status.py
+18
-0
my_status.yaml
test_backend_data/orders_data/my_status.yaml
+5
-0
No files found.
all_backend_api/orders_request.py
View file @
d8415725
...
...
@@ -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
())
all_backend_api/orders_request.yaml
View file @
d8415725
...
...
@@ -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
path_setting.py
View file @
d8415725
...
...
@@ -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"
)
...
...
test_backend_case/orders_case/test_my_status.py
0 → 100644
View file @
d8415725
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"
]
test_backend_data/orders_data/my_status.yaml
0 → 100644
View file @
d8415725
my_status
:
-
case
:
"
我的订单-各状态订单数量-接口调用成功case"
assert_error
:
0
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment