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
2a5433ad
Commit
2a5433ad
authored
Jun 04, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商祥页-优惠券列表-领取接口
parent
888722a0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
0 deletions
+58
-0
hybrid_get_gift_request.py
all_backend_api/hybrid_get_gift_request.py
+19
-0
hybrid_get_gift_request.yaml
all_backend_api/hybrid_get_gift_request.yaml
+10
-0
path_setting.py
path_setting.py
+3
-0
__init__.py
test_backend_case/hybrid_get_gift_case/__init__.py
+0
-0
test_get_gift_data.py
test_backend_case/hybrid_get_gift_case/test_get_gift_data.py
+20
-0
__init__.py
test_backend_data/hybrid_get_gift_data/__init__.py
+0
-0
get_gift_data.yaml
test_backend_data/hybrid_get_gift_data/get_gift_data.yaml
+6
-0
No files found.
all_backend_api/hybrid_get_gift_request.py
0 → 100644
View file @
2a5433ad
import
path_setting
from
in_common.base_request
import
BaseRequest
class
hybrid_get_gift_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HYBRID_GET_GIFT_CONFIG
)
#商祥页-美券列表
def
get_gift_data
(
self
,
gift_id
):
self
.
params
[
"gift_id"
]
=
gift_id
return
self
.
api_send
(
self
.
data
[
"get_gift_data"
])
if
__name__
==
'__main__'
:
#打印商祥页-优惠券列表-领取
print
(
hybrid_get_gift_request
()
.
get_gift_data
(
"63302"
))
\ No newline at end of file
all_backend_api/hybrid_get_gift_request.yaml
0 → 100644
View file @
2a5433ad
#商祥页-优惠券列表-领取
get_gift_data
:
method
:
post
url
:
/hybrid/get_gift/_data
params
:
{}
data
:
gift_id
:
${gift_id}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
2a5433ad
...
@@ -174,6 +174,9 @@ SHOPCART_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/shopcart_d
...
@@ -174,6 +174,9 @@ SHOPCART_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/shopcart_d
#商祥页-美券列表
#商祥页-美券列表
HYBRID_GIFT_LIST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_gift_list_request.yaml"
)
HYBRID_GIFT_LIST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_gift_list_request.yaml"
)
GIFT_LIST_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_gift_list_data"
,
"gift_list_data.yaml"
)
GIFT_LIST_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_gift_list_data"
,
"gift_list_data.yaml"
)
#商祥页-优惠券列表-领取
HYBRID_GET_GIFT_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_get_gift_request.yaml"
)
GET_GIFT_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_get_gift_data"
,
"get_gift_data.yaml"
)
#捜索结果页-医生/医院tab
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
...
...
test_backend_case/hybrid_get_gift_case/__init__.py
0 → 100644
View file @
2a5433ad
test_backend_case/hybrid_get_gift_case/test_get_gift_data.py
0 → 100644
View file @
2a5433ad
import
pytest
from
all_backend_api.hybrid_get_gift_request
import
hybrid_get_gift_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestGiftListData
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
GET_GIFT_DATA
)
get_gift_data_case
,
get_gift_data_data
=
get_ids
(
data
,
"get_gift_data"
)
@pytest.mark.parametrize
(
"param"
,
get_gift_data_data
,
ids
=
get_gift_data_case
)
def
test_get_gift_data
(
self
,
param
):
r
=
hybrid_get_gift_request
()
.
get_gift_data
(
param
[
"gift_id"
])
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
test_backend_data/hybrid_get_gift_data/__init__.py
0 → 100644
View file @
2a5433ad
test_backend_data/hybrid_get_gift_data/get_gift_data.yaml
0 → 100644
View file @
2a5433ad
get_gift_data
:
-
case
:
"
校验接口返回成功case"
gift_id
:
"
111"
assert_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