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
2e9d2f2f
Commit
2e9d2f2f
authored
Jun 08, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
美券列表
parent
574fc75c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
2 deletions
+57
-2
janus_request.py
all_backend_api/janus_request.py
+8
-1
janus_request.yaml
all_backend_api/janus_request.yaml
+8
-1
path_setting.py
path_setting.py
+2
-0
test_product_my_list.py
test_backend_case/janus_case/test_product_my_list.py
+23
-0
product_my_list.yaml
test_backend_data/janus_data/product_my_list.yaml
+16
-0
No files found.
all_backend_api/janus_request.py
View file @
2e9d2f2f
...
...
@@ -104,6 +104,12 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'keyword_tip'
])
# 新版本我的美券列表
def
product_my_list
(
self
,
start_num
,
tab_id
):
self
.
params
[
'start_num'
]
=
start_num
self
.
params
[
'tab_id'
]
=
tab_id
return
self
.
api_send
(
self
.
data
[
'coupon_my_list'
])
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
...
...
@@ -121,4 +127,4 @@ if __name__ == '__main__':
print
(
janus_request
()
.
polymer
())
print
(
"fgx"
)
print
(
janus_request
()
.
product_my_list
(
0
,
0
))
\ No newline at end of file
all_backend_api/janus_request.yaml
View file @
2e9d2f2f
...
...
@@ -98,6 +98,13 @@ keyword_tip:
#新版本我的美券
coupon_my_list
:
method
:
get
url
:
/api/janus/product/coupon/my_list
params
:
start_num
:
${start_num}
tab_id
:
${tab_id}
isLogin
:
1
path_setting.py
View file @
2e9d2f2f
...
...
@@ -96,6 +96,8 @@ EYELIDS_DIARY_CARDS_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_dat
GMAI_PLASTIC_ANALYSIS_V3_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"plastic_analysis_v3.yaml"
)
# 3D变脸
GMAI_PLASTIC_ANALYSIS_V2_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/gmai_data"
,
"plastic_analysis_v2.yaml"
)
# 新版本我的美券列表
JANUS_PRODUCT_MY_LIST_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_my_list.yaml"
)
LOGIN_PASSWD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/accounts_data"
,
"login_passwd.yaml"
)
...
...
test_backend_case/janus_case/test_product_my_list.py
0 → 100644
View file @
2e9d2f2f
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
TestProductMyLiSt
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
JANUS_PRODUCT_MY_LIST_DATA
)
product_my_list_detail_case
,
product_my_list_detail_data
=
get_ids
(
data
,
"product_my_list"
)
@pytest.mark.parametrize
(
"param"
,
product_my_list_detail_data
,
ids
=
product_my_list_detail_case
)
def
test_product_my_list
(
self
,
param
):
r
=
janus_request
()
.
product_my_list
(
param
[
"start_num"
],
param
[
"tab_id"
])
assert
r
[
"error"
]
==
0
coupon_list
=
r
[
"data"
][
"coupon_list"
]
print
(
len
(
coupon_list
))
assert
0
<=
len
(
coupon_list
)
<=
20
if
len
(
coupon_list
)
<
10
:
assert
r
[
"data"
][
"no_more_data"
]
is
True
test_backend_data/janus_data/product_my_list.yaml
0 → 100644
View file @
2e9d2f2f
product_my_list
:
-
case
:
"
未使用美券列表"
start_num
:
0
tab_id
:
0
-
case
:
"
已使用美券列表"
start_num
:
0
tab_id
:
1
-
case
:
"
已过期"
start_num
:
0
tab_id
:
2
\ 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