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
8b57e135
Commit
8b57e135
authored
May 19, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商祥页-收藏接口
parent
c1b00524
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
2 deletions
+48
-2
service_request.py
all_backend_api/service_request.py
+9
-2
service_request.yaml
all_backend_api/service_request.yaml
+11
-0
path_setting.py
path_setting.py
+2
-0
test_service_favor.py
test_backend_case/service_case/test_service_favor.py
+21
-0
service_favor.yaml
test_backend_data/service_data/service_favor.yaml
+5
-0
No files found.
all_backend_api/service_request.py
View file @
8b57e135
...
...
@@ -11,6 +11,13 @@ class service_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"home_v5"
])
#商祥页-收藏
def
service_favor
(
self
):
return
self
.
api_send
(
self
.
data
[
"service_favor"
])
if
__name__
==
'__main__'
:
print
(
service_request
()
.
home_v5
())
\ No newline at end of file
print
(
service_request
()
.
home_v5
())
#打印商祥页-收藏接口返回
print
(
service_request
()
.
service_favor
())
\ No newline at end of file
all_backend_api/service_request.yaml
View file @
8b57e135
...
...
@@ -6,3 +6,13 @@ home_v5:
data
:
{}
json
:
{}
#商祥页-收藏
service_favor
:
method
:
post
url
:
/api/service/favor/5857263/
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
\ No newline at end of file
path_setting.py
View file @
8b57e135
...
...
@@ -129,6 +129,8 @@ UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_dat
JANUS_PRODUCT_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"product_detail.yaml"
)
#商祥页-sku信息
JANUS_SKU_INFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"sku_info.yaml"
)
#商祥页-收藏
SERVICE_FAVOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"service_favor.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/service_case/test_service_favor.py
0 → 100644
View file @
8b57e135
import
pytest
from
all_backend_api.service_request
import
service_request
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
class
TestServiceFavor
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_FAVOR
)
service_favor_case
,
service_favor_data
=
get_ids
(
data
,
"service_favor"
)
@pytest.mark.parametrize
(
"param"
,
service_favor_data
,
ids
=
service_favor_case
)
def
test_service_favor
(
self
,
param
):
r
=
service_request
()
.
service_favor
()
if
r
[
"error"
]
==
0
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
print
(
service_request
()
.
service_favor
())
test_backend_data/service_data/service_favor.yaml
0 → 100644
View file @
8b57e135
service_favor
:
-
case
:
"
校验收藏成功case"
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