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
7af4a313
Commit
7af4a313
authored
May 11, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医生主页案例列表接口
parent
0f958609
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
1 deletion
+48
-1
doctor_request.py
all_backend_api/doctor_request.py
+10
-1
doctor_request.yaml
all_backend_api/doctor_request.yaml
+12
-0
path_setting.py
path_setting.py
+2
-0
test_diary.py
test_backend_case/doctor_case/test_diary.py
+18
-0
diary.yaml
test_backend_data/doctor_data/diary.yaml
+6
-0
No files found.
all_backend_api/doctor_request.py
View file @
7af4a313
...
...
@@ -16,10 +16,18 @@ class doctor_request(BaseRequest):
def
detail
(
self
):
return
self
.
api_send
(
self
.
data
[
"detail"
])
#医生主页案例列表
def
diary
(
self
,
doctor_id
):
self
.
params
[
"doctor_id"
]
=
doctor_id
return
self
.
api_send
(
self
.
data
[
"diary"
])
if
__name__
==
'__main__'
:
#打印医生/医院主页-医生说/医院说列表接口返回
print
(
doctor_request
()
.
article
(
"9918ad7eb8f511e58f8200163e000a4a"
))
#打印医生详情接口返回
#打印医生
主页
详情接口返回
print
(
doctor_request
.
detail
())
#打印医生主页案例列表接口返回
print
(
doctor_request
.
diary
(
"5bd9f05cad51403d853ba8c881989e23"
))
\ No newline at end of file
all_backend_api/doctor_request.yaml
View file @
7af4a313
...
...
@@ -18,3 +18,14 @@ detail:
params
:
{}
data
:
{}
json
:
{}
#医生主页案例列表
diary
:
method
:
get
url
:
/api/doctor/diary
params
:
doctor_id
:
${doctor_id}
count
:
4
page
:
1
data
:
{}
json
:
{}
\ No newline at end of file
path_setting.py
View file @
7af4a313
...
...
@@ -69,6 +69,8 @@ DOCTOR_ARTICLE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "
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"
)
#医生主页案例列表
DOCTOR_DIARY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/doctor_data"
,
"diary.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_diary.py
0 → 100644
View file @
7af4a313
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
TestDiary
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_DIARY
)
diary_case
,
diary_data
=
get_ids
(
data
,
"diary"
)
@pytest.mark.parametrize
(
"param"
,
diary_data
,
ids
=
diary_case
)
def
test_diary
(
self
,
param
):
r
=
doctor_request
()
.
diary
(
param
[
"doctor_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/doctor_data/diary.yaml
0 → 100644
View file @
7af4a313
diary
:
-
case
:
"
校验接口返回成功case"
doctor_id
:
5bd9f05cad51403d853ba8c881989e23
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