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
888722a0
Commit
888722a0
authored
Jun 04, 2021
by
邓莹莹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into common_dev
parents
306d66f3
cfc3d3ed
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
0 deletions
+64
-0
hybrid_gift_list_request.py
all_backend_api/hybrid_gift_list_request.py
+21
-0
hybrid_gift_list_request.yaml
all_backend_api/hybrid_gift_list_request.yaml
+12
-0
path_setting.py
path_setting.py
+3
-0
__init__.py
test_backend_case/hybrid_gift_list_case/__init__.py
+0
-0
test_gift_list_data.py
...backend_case/hybrid_gift_list_case/test_gift_list_data.py
+20
-0
__init__.py
test_backend_data/hybrid_gift_list_data/__init__.py
+0
-0
gift_list_data.yaml
test_backend_data/hybrid_gift_list_data/gift_list_data.yaml
+8
-0
No files found.
all_backend_api/hybrid_gift_list_request.py
0 → 100644
View file @
888722a0
import
path_setting
from
in_common.base_request
import
BaseRequest
class
hybrid_gift_list_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HYBRID_GIFT_LIST_CONFIG
)
#商祥页-美券列表
def
gift_list_data
(
self
,
service_id
,
gift_type
,
page
):
self
.
params
[
"service_id"
]
=
service_id
self
.
params
[
"gift_type"
]
=
gift_type
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
data
[
"gift_list_data"
])
if
__name__
==
'__main__'
:
#打印商祥页-美券列表接口返回
print
(
hybrid_gift_list_request
()
.
gift_list_data
(
"5857263"
,
1
,
1
))
\ No newline at end of file
all_backend_api/hybrid_gift_list_request.yaml
0 → 100644
View file @
888722a0
#商祥页-美券列表
gift_list_data
:
method
:
get
url
:
/hybrid/gift_list/_data
params
:
service_id
:
${service_id}
gift_type
:
${gift_type}
page
:
${page}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
888722a0
...
...
@@ -171,6 +171,9 @@ SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "servic
SERVICES_SHARE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/services_data"
,
"share_data.yaml"
)
#商祥页-加入购物车
SHOPCART_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/shopcart_data"
,
"add.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"
)
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"search_request.yaml"
)
...
...
test_backend_case/hybrid_gift_list_case/__init__.py
0 → 100644
View file @
888722a0
test_backend_case/hybrid_gift_list_case/test_gift_list_data.py
0 → 100644
View file @
888722a0
import
pytest
from
all_backend_api.hybrid_gift_list_request
import
hybrid_gift_list_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
.
GIFT_LIST_DATA
)
gift_list_data_case
,
gift_list_data_data
=
get_ids
(
data
,
"gift_list_data"
)
@pytest.mark.parametrize
(
"param"
,
gift_list_data_data
,
ids
=
gift_list_data_case
)
def
test_gift_list_data
(
self
,
param
):
r
=
hybrid_gift_list_request
()
.
gift_list_data
(
param
[
"service_id"
],
param
[
"gift_type"
],
param
[
"page"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/hybrid_gift_list_data/__init__.py
0 → 100644
View file @
888722a0
test_backend_data/hybrid_gift_list_data/gift_list_data.yaml
0 → 100644
View file @
888722a0
gift_list_data
:
-
case
:
"
校验接口返回成功case"
service_id
:
5857263
gift_type
:
1
page
:
1
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