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
5ee1c27b
Commit
5ee1c27b
authored
May 20, 2021
by
冯艮霞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品类聚合页面标签和专场
parent
eb5e12d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
0 deletions
+63
-0
janus_request.py
all_backend_api/janus_request.py
+15
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+11
-0
path_setting.py
path_setting.py
+3
-0
test_polymer.py
test_backend_case/janus_case/test_polymer.py
+19
-0
polymer.yaml
test_backend_data/janus_data/polymer.yaml
+15
-0
No files found.
all_backend_api/janus_request.py
View file @
5ee1c27b
...
...
@@ -10,6 +10,8 @@ class janus_request(BaseRequest):
#品类聚合页面商品列表
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_SERVICE_CONFIG
)
#品类聚合页面标签和专场
self
.
data
=
self
.
api_load
(
path_setting
.
POLYMER_CONFIG
)
#搜索结果页-综合/百科tab
def
content_v7
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
...
...
@@ -76,6 +78,15 @@ class janus_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"tag_service"
])
# 品类聚合页面标签和专场
def
polymer
(
self
,
version
,
category_polymer_id
,
device_id
):
print
(
"fgx"
)
self
.
params
[
'version'
]
=
version
self
.
params
[
'category_polymer_id'
]
=
category_polymer_id
self
.
params
[
'device_id'
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"polymer"
])
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
...
...
@@ -89,4 +100,8 @@ if __name__ == '__main__':
print
(
janus_request
()
.
tag_service
())
print
(
"fgx"
)
#品类聚合页面标签和专场
print
(
janus_request
()
.
polymer
())
print
(
"fgx"
)
all_backend_api/janus_request.yaml
View file @
5ee1c27b
...
...
@@ -72,6 +72,17 @@ tag_service:
json
:
{
}
#品类聚合页标签和专场
polymer
:
method
:
GET
url
:
/api/janus/product/polymer
params
:
version
:
${version}
category_polymer_id
:
${category_polymer_id}
device_id
:
${device_id}
data
:
{
}
json
:
{
}
...
...
path_setting.py
View file @
5ee1c27b
...
...
@@ -150,6 +150,9 @@ CONFIG_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data",
COMMUNITY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"feed_request.yaml"
)
COMMUNITY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/feed_data"
,
"community.yaml"
)
#品类聚合页面标签和专场
POLYMER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
POLYMER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"polymer.yaml"
)
if
__name__
==
'__main__'
:
...
...
test_backend_case/janus_case/test_polymer.py
0 → 100644
View file @
5ee1c27b
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_request
import
janus_request
class
TestPolymer
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
POLYMER
)
polymer_case
,
polymer_data
=
get_ids
(
data
,
"polymer"
)
@pytest.mark.parametrize
(
"param"
,
polymer_data
,
ids
=
polymer_case
)
def
test_polymer
(
self
,
param
):
r
=
janus_request
()
.
polymer
(
param
[
"version"
],
param
[
"category_polymer_id"
],
param
[
"device_id"
])
print
(
'feng='
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"id"
]
==
param
[
"assert"
]
test_backend_data/janus_data/polymer.yaml
0 → 100644
View file @
5ee1c27b
polymer
:
#品类聚合页标签和专场banner
-
case
:
"
品类聚合页面标签和专场banner"
assert
:
82
version
:
7.43.0
category_polymer_id
:
82
device_id
:
869378034450718
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