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
0f958609
Commit
0f958609
authored
May 11, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医生主页详情接口
parent
97c8e6db
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
2 deletions
+43
-2
doctor_request.py
all_backend_api/doctor_request.py
+9
-2
doctor_request.yaml
all_backend_api/doctor_request.yaml
+9
-0
path_setting.py
path_setting.py
+2
-0
test_detail.py
test_backend_case/doctor_case/test_detail.py
+18
-0
detail.yaml
test_backend_data/doctor_data/detail.yaml
+5
-0
No files found.
all_backend_api/doctor_request.py
View file @
0f958609
...
...
@@ -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
all_backend_api/doctor_request.yaml
View file @
0f958609
...
...
@@ -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
path_setting.py
View file @
0f958609
...
...
@@ -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"
)
...
...
test_backend_case/doctor_case/test_detail.py
0 → 100644
View file @
0f958609
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"
]
test_backend_data/doctor_data/detail.yaml
0 → 100644
View file @
0f958609
detail
:
-
case
:
"
校验接口返回成功case"
assert_error
:
0
\ 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