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
71ebfe4f
Commit
71ebfe4f
authored
Apr 20, 2021
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医生说/医院说接口
parent
8026f680
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
1 deletion
+59
-1
doctor_request.py
all_backend_api/doctor_request.py
+19
-0
doctor_request.yaml
all_backend_api/doctor_request.yaml
+13
-0
path_setting.py
path_setting.py
+3
-1
__init__.py
test_backend_case/doctor_case/__init__.py
+0
-0
test_article.py
test_backend_case/doctor_case/test_article.py
+18
-0
__init__.py
test_backend_data/doctor_data/__init__.py
+0
-0
article.yaml
test_backend_data/doctor_data/article.yaml
+6
-0
No files found.
all_backend_api/doctor_request.py
0 → 100644
View file @
71ebfe4f
import
path_setting
from
in_common.base_request
import
BaseRequest
class
doctor_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
DOCTOR_ARTICLE_CONFIG
)
#医院主页日记列表
def
article
(
self
,
doctor_id
):
self
.
params
[
"doctor_id"
]
=
doctor_id
return
self
.
api_send
(
self
.
data
[
"article"
])
if
__name__
==
'__main__'
:
#打印医生/医院主页-医生说/医院说列表接口返回
print
(
doctor_request
()
.
article
(
"9918ad7eb8f511e58f8200163e000a4a"
))
\ No newline at end of file
all_backend_api/doctor_request.yaml
0 → 100644
View file @
71ebfe4f
#医生/医院主页——医生说/医院说
article
:
method
:
get
url
:
/api/doctor/article
params
:
doctor_id
:
${doctor_id}
count
:
10
page
:
1
own_page
:
0
doctor_type
:
0
data
:
{}
json
:
{}
\ No newline at end of file
path_setting.py
View file @
71ebfe4f
...
...
@@ -37,7 +37,9 @@ HOSPITAL_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hospit
#医院主页日记列表
HOSPITAL_DIARY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hospital_request.yaml"
)
HOSPITAL_DIARY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospital_data"
,
"diary.yaml"
)
#医生/医院主页-医生/医院说列表
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"
)
HOME_V5_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"service_request.yaml"
)
HOME_V5
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_v5.yaml"
)
...
...
test_backend_case/doctor_case/__init__.py
0 → 100644
View file @
71ebfe4f
test_backend_case/doctor_case/test_article.py
0 → 100644
View file @
71ebfe4f
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
TestArticle
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DOCTOR_ARTICLE
)
article_case
,
article_data
=
get_ids
(
data
,
"article"
)
@pytest.mark.parametrize
(
"param"
,
article_data
,
ids
=
article_case
)
def
test_article
(
self
,
param
):
r
=
doctor_request
()
.
article
(
param
[
"doctor_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/doctor_data/__init__.py
0 → 100644
View file @
71ebfe4f
test_backend_data/doctor_data/article.yaml
0 → 100644
View file @
71ebfe4f
article
:
-
case
:
"
校验接口返回成功case"
doctor_id
:
"
9918ad7eb8f511e58f8200163e000a4a"
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