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
d44ba5f8
You need to sign in or sign up before continuing.
Commit
d44ba5f8
authored
Jun 15, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
次卡-取消订单接口
parent
d8415725
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
0 deletions
+45
-0
janus_request.py
all_backend_api/janus_request.py
+7
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+10
-0
path_setting.py
path_setting.py
+2
-0
test_beauty_card_payment_delete.py
...ackend_case/janus_case/test_beauty_card_payment_delete.py
+21
-0
beauty_card_payment_delete.yaml
test_backend_data/janus_data/beauty_card_payment_delete.yaml
+5
-0
No files found.
all_backend_api/janus_request.py
View file @
d44ba5f8
...
...
@@ -156,6 +156,11 @@ class janus_request(BaseRequest):
self
.
params
[
"payment_id"
]
=
payment_id
return
self
.
api_send
(
self
.
data
[
"beauty_card_payment_detail"
])
#次卡-取消订单
def
beauty_card_payment_delete
(
self
,
payment_id
):
self
.
params
[
"payment_id"
]
=
payment_id
return
self
.
api_send
(
self
.
data
[
"beauty_card_payment_delete"
])
# 新版本我的美券列表
def
product_my_list
(
self
,
start_num
,
tab_id
):
self
.
params
[
'start_num'
]
=
start_num
...
...
@@ -195,6 +200,8 @@ if __name__ == '__main__':
print
(
janus_request
()
.
beauty_card_prepay_alipay
(
0
,
"101353630959868"
))
#打印次卡 - 订单详情接口返回
print
(
janus_request
()
.
beauty_card_payment_detail
(
"101353630959868"
))
# 打印次卡 - 取消订单接口返回
print
(
janus_request
()
.
beauty_card_payment_delete
(
"101353630959868"
))
print
(
janus_request
()
.
product_my_list
(
0
,
0
))
all_backend_api/janus_request.yaml
View file @
d44ba5f8
...
...
@@ -201,6 +201,16 @@ beauty_card_payment_detail:
json
:
{}
isLogin
:
1
#次卡-取消订单
beauty_card_payment_delete
:
method
:
post
url
:
/api/janus/beauty_card/payment/delete
params
:
{}
data
:
payment_id
:
${payment_id}
json
:
{}
isLogin
:
1
#新版本我的美券
coupon_my_list
:
method
:
get
...
...
path_setting.py
View file @
d44ba5f8
...
...
@@ -280,6 +280,8 @@ BEAUTY_CARD_PREPAY_WECHAT = os.path.join(BASE_DIR, "backend_auto/test_backend_da
BEAUTY_CARD_PREPAY_ALIPAY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_prepay_alipay.yaml"
)
#次卡-订单详情
BEAUTY_CARD_PAYMENT_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_payment_detail.yaml"
)
#次卡-取消订单
BEAUTY_CARD_PAYMENT_DELETE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_payment_delete.yaml"
)
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
...
...
test_backend_case/janus_case/test_beauty_card_payment_delete.py
0 → 100644
View file @
d44ba5f8
import
pytest
from
all_backend_api.janus_request
import
janus_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestBeautyCardPaymentDelete
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY_CARD_PAYMENT_DELETE
)
beauty_card_payment_delete_case
,
beauty_card_payment_delete_data
=
get_ids
(
data
,
"beauty_card_payment_delete"
)
@pytest.mark.parametrize
(
"param"
,
beauty_card_payment_delete_data
,
ids
=
beauty_card_payment_delete_case
)
def
test_beauty_card_payment_delete
(
self
,
param
):
payment
=
janus_request
()
.
beauty_card_order_submit
(
"12345678912"
,
"10176"
,
1
,
1
,
0
,
0
)
payment_id
=
payment
[
"data"
][
"payment_id"
]
r
=
janus_request
()
.
beauty_card_payment_delete
(
payment_id
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"message"
]
==
param
[
"assert_data_message"
]
test_backend_data/janus_data/beauty_card_payment_delete.yaml
0 → 100644
View file @
d44ba5f8
beauty_card_payment_delete
:
-
case
:
"
次卡取消订单-接口调用成功case"
assert_data_message
:
"
取消成功"
\ 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