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
c1b00524
Commit
c1b00524
authored
May 18, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商祥页-sku信息接口
parent
f9df5b4e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
1 deletion
+46
-1
janus_request.py
all_backend_api/janus_request.py
+8
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+10
-0
path_setting.py
path_setting.py
+2
-1
test_sku_info.py
test_backend_case/janus_case/test_sku_info.py
+19
-0
sku_info.yaml
test_backend_data/janus_data/sku_info.yaml
+7
-0
No files found.
all_backend_api/janus_request.py
View file @
c1b00524
...
@@ -54,11 +54,19 @@ class janus_request(BaseRequest):
...
@@ -54,11 +54,19 @@ class janus_request(BaseRequest):
self
.
params
[
"version"
]
=
version
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"product_detail"
])
return
self
.
api_send
(
self
.
data
[
"product_detail"
])
#商祥页-sku信息
def
sku_info
(
self
,
service_id
,
service_item_id
):
self
.
params
[
"service_id"
]
=
service_id
self
.
params
[
"service_item_id"
]
=
service_item_id
return
self
.
api_send
(
self
.
data
[
"sku_info"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
#打印购物车-猜你喜欢列表接口返回
print
(
janus_request
()
.
mine_guess_you_like
())
print
(
janus_request
()
.
mine_guess_you_like
())
#打印商祥页-详情接口返回
#打印商祥页-详情接口返回
print
(
janus_request
()
.
product_detail
(
"5857263"
,
"618788"
,
"7.43.0"
))
print
(
janus_request
()
.
product_detail
(
"5857263"
,
"618788"
,
"7.43.0"
))
#打印商祥页-sku信息接口返回
print
(
janus_request
()
.
sku_info
(
"5857263"
,
"618788"
))
all_backend_api/janus_request.yaml
View file @
c1b00524
...
@@ -47,6 +47,16 @@ product_detail:
...
@@ -47,6 +47,16 @@ product_detail:
data
:
{}
data
:
{}
json
:
{}
json
:
{}
#商祥页-sku信息
sku_info
:
method
:
get
url
:
/api/janus/product/detail/sku_info
params
:
service_id
:
${service_id}
service_item_id
:
${service_item_id}
data
:
{}
json
:
{}
...
...
path_setting.py
View file @
c1b00524
...
@@ -127,7 +127,8 @@ UNREAD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/notification_dat
...
@@ -127,7 +127,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"
)
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"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/janus_case/test_sku_info.py
0 → 100644
View file @
c1b00524
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
TestSkuInfo
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
JANUS_SKU_INFO
)
sku_info_case
,
sku_info_data
=
get_ids
(
data
,
"sku_info"
)
@pytest.mark.parametrize
(
"param"
,
sku_info_data
,
ids
=
sku_info_case
)
def
test_sku_info
(
self
,
param
):
r
=
janus_request
()
.
sku_info
(
param
[
"service_id"
],
param
[
"service_item_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/janus_data/sku_info.yaml
0 → 100644
View file @
c1b00524
sku_info
:
-
case
:
"
校验接口返回成功case"
service_id
:
"
5857263"
service_item_id
:
"
618788"
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