Commit 0f958609 authored by 张慧's avatar 张慧

医生主页详情接口

parent 97c8e6db
......@@ -12,7 +12,14 @@ class doctor_request(BaseRequest):
self.params["doctor_id"] = doctor_id
return self.api_send(self.data["article"])
#医生主页详情
def detail(self):
return self.api_send(self.data["detail"])
if __name__ == '__main__':
#打印医生/医院主页-医生说/医院说列表接口返回
print(doctor_request().article("9918ad7eb8f511e58f8200163e000a4a"))
\ No newline at end of file
print(doctor_request().article("9918ad7eb8f511e58f8200163e000a4a"))
#打印医生详情接口返回
print(doctor_request.detail())
\ No newline at end of file
......@@ -9,4 +9,12 @@ article:
own_page: 0
doctor_type: 0
data: {}
json: {}
#医生主页详情
detail:
method: get
url: /api/doctor/5bd9f05cad51403d853ba8c881989e23/detail
params: {}
data: {}
json: {}
\ No newline at end of file
......@@ -67,6 +67,8 @@ HOSPITAL_DIARY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hospital
#医生/医院主页-医生/医院说列表
DOCTOR_ARTICLE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "doctor_request.yaml")
DOCTOR_ARTICLE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/doctor_data", "article.yaml")
#医生主页详情
DOCTOR_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/doctor_data", "detail.yaml")
#医生/医院主页-问答列表
USER_ANSWER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
USER_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "answer.yaml")
......
import pytest
from all_backend_api.doctor_request import doctor_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestDetail:
data = BaseRequest().api_load(path_setting.DOCTOR_DETAIL)
detail_case, detail_data = get_ids(data, "detail")
@pytest.mark.parametrize("param", detail_data, ids=detail_case)
def test_detail(self, param):
r = doctor_request().detail()
if r["error"] == 0:
assert r["error"] == param["assert_error"]
detail:
-
case: "校验接口返回成功case"
assert_error: 0
\ 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