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
16d64d2b
Commit
16d64d2b
authored
Jun 10, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
次卡-确认订单接口
parent
b944b4a6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
0 deletions
+54
-0
janus_request.py
all_backend_api/janus_request.py
+10
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+14
-0
path_setting.py
path_setting.py
+3
-0
test_beauty_card_confirm.py
test_backend_case/janus_case/test_beauty_card_confirm.py
+19
-0
beauty_card_confirm.yaml
test_backend_data/janus_data/beauty_card_confirm.yaml
+8
-0
No files found.
all_backend_api/janus_request.py
View file @
16d64d2b
...
...
@@ -110,6 +110,13 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'keyword_tip'
])
#次卡-确认订单
def
beauty_card_confirm
(
self
,
sku_id
,
number
,
use_bc_coupon
,
bc_coupon_id
):
self
.
params
[
"sku_id"
]
=
sku_id
self
.
params
[
"number"
]
=
number
self
.
params
[
"use_bc_coupon"
]
=
use_bc_coupon
self
.
params
[
"bc_coupon_id"
]
=
bc_coupon_id
return
self
.
api_send
(
self
.
data
[
"beauty_card_confirm"
])
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
...
...
@@ -129,6 +136,9 @@ if __name__ == '__main__':
print
(
janus_request
()
.
polymer
())
print
(
"fgx"
)
#打印次卡-确认订单接口返回
print
(
janus_request
()
.
beauty_card_confirm
(
"10176"
,
1
,
1
,
0
))
all_backend_api/janus_request.yaml
View file @
16d64d2b
...
...
@@ -107,6 +107,20 @@ keyword_tip:
data
:
{}
json
:
{}
#次卡-确认订单
beauty_card_confirm
:
method
:
post
url
:
/api/janus/beauty_card/order/confirm
params
:
{}
data
:
sku_id
:
${sku_id}
number
:
${number}
bctraceid
:
"
"
use_bc_coupon
:
${use_bc_coupon}
bc_coupon_id
:
${bc_coupon_id}
json
:
{}
isLogin
:
1
...
...
path_setting.py
View file @
16d64d2b
...
...
@@ -202,6 +202,9 @@ PRODUCT_COUPON_MY_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/
HYBRID_PROMOTION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_promotion_request.yaml"
)
RELATED_SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_promotion_data"
,
"related_service_data.yaml"
)
#次卡-确认订单
BEAUTY_CARD_CONFIRM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_confirm.yaml"
)
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
CONTENTV6
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/search_data"
,
"content_v6.yaml"
)
...
...
test_backend_case/janus_case/test_beauty_card_confirm.py
0 → 100644
View file @
16d64d2b
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
TestBeautyCardConfirm
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BEAUTY_CARD_CONFIRM
)
beauty_card_confirm_case
,
beauty_card_confirm_data
=
get_ids
(
data
,
"beauty_card_confirm"
)
@pytest.mark.parametrize
(
"param"
,
beauty_card_confirm_data
,
ids
=
beauty_card_confirm_case
)
def
test_beauty_card_confirm
(
self
,
param
):
r
=
janus_request
()
.
beauty_card_confirm
(
param
[
"sku_id"
],
param
[
"number"
],
param
[
"use_bc_coupon"
],
param
[
"bc_coupon_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/janus_data/beauty_card_confirm.yaml
0 → 100644
View file @
16d64d2b
beauty_card_confirm
:
-
case
:
"
次卡-确认订单-接口调用成功case"
sku_id
:
"
10176"
number
:
1
use_bc_coupon
:
1
bc_coupon_id
:
0
assert_error
:
0
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