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
4e5cc3d5
Commit
4e5cc3d5
authored
May 19, 2021
by
aha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医生/医院tab捜索
parent
f8a61f10
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
6 deletions
+42
-6
search_request.py
all_backend_api/search_request.py
+4
-1
search_request.yaml
all_backend_api/search_request.yaml
+2
-0
test_content_v6.py
test_backend_case/search_case/test_content_v6.py
+6
-2
content_v6.yaml
test_backend_data/search_data/content_v6.yaml
+30
-3
No files found.
all_backend_api/search_request.py
View file @
4e5cc3d5
...
...
@@ -14,7 +14,7 @@ class search_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"keywords"
])
#搜索结果页-医生/医院tab
def
content_v6
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
):
def
content_v6
(
self
,
query
,
device_id
,
current_city_id
,
version
,
is_first
,
tab_type
,
offset
,
size
):
#搜索词
self
.
params
[
'query'
]
=
query
#设备号
...
...
@@ -29,4 +29,6 @@ class search_request(BaseRequest):
self
.
params
[
'tab_type'
]
=
tab_type
#请求的页数 0,10,20
self
.
params
[
'offset'
]
=
offset
# 请求的size
self
.
params
[
'size'
]
=
size
return
self
.
api_send
(
self
.
data
[
"content_v6"
])
\ No newline at end of file
all_backend_api/search_request.yaml
View file @
4e5cc3d5
...
...
@@ -22,5 +22,6 @@ content_v6:
is_first
:
${is_first}
tab_type
:
${tab_type}
offset
:
${offset}
size
:
${size}
data
:
{}
json
:
{}
\ No newline at end of file
test_backend_case/search_case/test_content_v6.py
View file @
4e5cc3d5
...
...
@@ -16,8 +16,11 @@ class TestContentV6:
@pytest.mark.parametrize
(
"param"
,
contentv6_data
,
ids
=
contentv6_case
)
def
test_content_v6
(
self
,
param
):
print
(
param
[
'query'
])
r
=
search_request
()
.
content_v6
(
param
[
"query"
],
param
[
"device_id"
],
param
[
"current_city_id"
],
param
[
"version"
],
param
[
"is_first"
],
param
[
"tab_type"
],
param
[
"offset"
])
r
=
search_request
()
.
content_v6
(
param
[
"query"
],
param
[
"device_id"
],
param
[
"current_city_id"
],
param
[
"version"
],
param
[
"is_first"
],
param
[
"tab_type"
],
param
[
"offset"
]
,
param
[
"size"
]
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"hospitals"
][
0
][
"name"
]
==
param
[
"assert"
]
if
param
[
"tab_type"
]
==
3
:
assert
r
[
"data"
][
"hospitals"
][
0
][
"name"
]
==
param
[
"assert"
]
if
param
[
"tab_type"
]
==
4
:
assert
r
[
"data"
][
"doctors"
][
0
][
"name"
]
==
param
[
"assert"
]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/search_data/content_v6.yaml
View file @
4e5cc3d5
...
...
@@ -6,7 +6,34 @@ content_v6:
device_id
:
"
97B6764B-2135-4761-9911-701C38CBC272"
current_city_id
:
"
beijing"
version
:
"
742.2"
is_first
:
"
1
"
is_first
:
"
0
"
tab_type
:
"
3"
offset
:
"
0"
assert
:
北京画美医院
\ No newline at end of file
size
:
"
10"
assert
:
北京画美医院
-
#医院tab-捜索医院简称,捜索结果只召回该医院
case
:
"
医院tab-捜索医院简称,捜索结果只召回该医院"
query
:
"
北京画美"
device_id
:
"
97B6764B-2135-4761-9911-701C38CBC272"
current_city_id
:
"
beijing"
version
:
"
742.2"
is_first
:
"
0"
tab_type
:
"
3"
offset
:
"
0"
size
:
"
10"
assert
:
北京画美医院
-
#医生tab-捜索医生姓名,捜索结果只召回该医生
case
:
"
医生tab-捜索医生姓名,捜索结果只召回该医生"
query
:
"
崔鑫"
device_id
:
"
97B6764B-2135-4761-9911-701C38CBC272"
current_city_id
:
"
beijing"
version
:
"
742.2"
is_first
:
"
0"
tab_type
:
"
4"
offset
:
"
0"
size
:
"
10"
assert
:
崔鑫
\ 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