Commit 4e5cc3d5 authored by aha's avatar aha

医生/医院tab捜索

parent f8a61f10
......@@ -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
......@@ -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
......@@ -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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment