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
9c72d5d4
Commit
9c72d5d4
authored
May 19, 2021
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品类聚合页面商品列表
parent
2b702d05
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
1 deletion
+72
-1
janus_request.py
all_backend_api/janus_request.py
+21
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+15
-0
path_setting.py
path_setting.py
+3
-1
test_tag_service.py
test_backend_case/janus_case/test_tag_service.py
+20
-0
tag_service.yaml
test_backend_data/janus_data/tag_service.yaml
+13
-0
No files found.
all_backend_api/janus_request.py
View file @
9c72d5d4
...
...
@@ -7,6 +7,10 @@ class janus_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
CONTENTV7_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
HOSPITALSEARCH_CONFIG
)
#品类聚合页面商品列表
self
.
data
=
self
.
api_load
(
path_setting
.
TAG_SERVICE_CONFIG
)
#搜索结果页-综合/百科tab
def
content_v7
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
#搜索词
...
...
@@ -47,9 +51,26 @@ class janus_request(BaseRequest):
def
mine_guess_you_like
(
self
):
return
self
.
api_send
(
self
.
data
[
"mine_guess_you_like"
])
# 品类聚合页面商品列表
def
tag_service
(
self
,
size
,
tag_ids
,
offset
,
tag_id
,
version
,
device_id
):
print
(
"fgx"
)
self
.
params
[
'size'
]
=
size
self
.
params
[
'tag_ids'
]
=
tag_ids
self
.
params
[
'offset'
]
=
offset
self
.
params
[
'tag_id'
]
=
tag_id
self
.
params
[
'version'
]
=
version
self
.
params
[
'device_id'
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"tag_service"
])
if
__name__
==
'__main__'
:
#打印购物车-猜你喜欢列表接口返回
print
(
janus_request
()
.
mine_guess_you_like
())
#品类聚合页面商品列表接口返回
print
(
janus_request
()
.
tag_service
())
print
(
"fgx"
)
all_backend_api/janus_request.yaml
View file @
9c72d5d4
...
...
@@ -36,6 +36,21 @@ mine_guess_you_like:
json
:
{}
isLogin
:
1
#品类聚合页面商品列表的
tag_service
:
method
:
GET
url
:
/api/janus/product/tag_service
params
:
size
:
10
tag_ids
:
[]
offset
:
0
tag_id
:
version
:
7.43.0
device_id
:
869378034450718
data
:
{
}
json
:
{
}
...
...
path_setting.py
View file @
9c72d5d4
...
...
@@ -127,7 +127,9 @@ AUTO_MSG = os.path.join(BASE_DIR, "backend_auto/test_backend_data/im_data", "aut
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
UNREAD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/notification_data"
,
"unread.yaml"
)
#品类聚合页面商品列表
TAG_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
TAG_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"tag_service.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/janus_case/test_tag_service.py
0 → 100644
View file @
9c72d5d4
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
TestTagService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
TAG_SERVICE
)
tagservice_case
,
tagservice_data
=
get_ids
(
data
,
"tag_service"
)
@pytest.mark.parametrize
(
"param"
,
tagservice_data
,
ids
=
tagservice_case
)
def
test_tag_service
(
self
,
param
):
r
=
janus_request
()
.
tag_service
(
param
[
"size"
],
param
[
"tag_ids"
],
param
[
"offset"
],
param
[
"tag_id"
],
param
[
"version"
],
param
[
"device_id"
])
print
(
'feng='
,
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
"offset"
]
==
param
[
"offset"
]
test_backend_data/janus_data/tag_service.yaml
0 → 100644
View file @
9c72d5d4
tag_service
:
#品类聚合页面商品
-
case
:
"
品类聚合页面商品列表"
assert
:
0
offset
:
10
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