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
8026f680
Commit
8026f680
authored
Apr 20, 2021
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医院主页日记列表接口
parent
2cc9caa1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
3 deletions
+63
-3
hospital_request.py
all_backend_api/hospital_request.py
+19
-0
hospital_request.yaml
all_backend_api/hospital_request.yaml
+13
-0
hospitals_request.yaml
all_backend_api/hospitals_request.yaml
+2
-2
hospitals_v2_request.yaml
all_backend_api/hospitals_v2_request.yaml
+1
-1
path_setting.py
path_setting.py
+4
-0
__init__.py
test_backend_case/hospital_case/__init__.py
+0
-0
test_diary.py
test_backend_case/hospital_case/test_diary.py
+18
-0
__init__.py
test_backend_data/hospital_data/__init__.py
+0
-0
diary.yaml
test_backend_data/hospital_data/diary.yaml
+6
-0
No files found.
all_backend_api/hospital_request.py
0 → 100644
View file @
8026f680
import
path_setting
from
in_common.base_request
import
BaseRequest
class
hospital_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HOSPITAL_DIARY_CONFIG
)
#医院主页日记列表
def
diary
(
self
,
hospital
):
self
.
params
[
"hospital"
]
=
hospital
return
self
.
api_send
(
self
.
data
[
"diary"
])
if
__name__
==
'__main__'
:
#打印医院主页日记列表接口返回
print
(
hospital_request
()
.
diary
(
"bjxyjcpfbyy"
))
\ No newline at end of file
all_backend_api/hospital_request.yaml
0 → 100644
View file @
8026f680
#医院主页日记列表
diary
:
method
:
get
url
:
/api/hospital/diary
params
:
hospital
:
${hospital}
count
:
4
page
:
1
own_page
:
0
tag_id
:
data
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/hospitals_request.yaml
View file @
8026f680
#详情
#
医院主页
详情
detail
:
method
:
get
url
:
/api/hospitals/bjxyjcpfbyy/detail
...
...
@@ -6,7 +6,7 @@ detail:
data
:
{}
json
:
{}
#医生列表
#医
院主页医
生列表
doctor
:
method
:
get
url
:
/api/hospitals/bjxyjcpfbyy/doctors
...
...
all_backend_api/hospitals_v2_request.yaml
View file @
8026f680
#商品列表
#
医院主页
商品列表
services
:
method
:
get
url
:
/api/hospitals_v2/bjxyjcpfbyy/services
...
...
path_setting.py
View file @
8026f680
...
...
@@ -34,6 +34,10 @@ HOSPITAL_DOCTOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hospita
#医院主页商品列表
HOSPITAL_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hospitals_v2_request.yaml"
)
HOSPITAL_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospitals_v2_data"
,
"services.yaml"
)
#医院主页日记列表
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"
)
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/hospital_case/__init__.py
0 → 100644
View file @
8026f680
test_backend_case/hospital_case/test_diary.py
0 → 100644
View file @
8026f680
import
pytest
from
all_backend_api.hospital_request
import
hospital_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
.
HOSPITAL_DIARY
)
diary_case
,
diary_data
=
get_ids
(
data
,
"diary"
)
@pytest.mark.parametrize
(
"param"
,
diary_data
,
ids
=
diary_case
)
def
test_diary
(
self
,
param
):
r
=
hospital_request
()
.
diary
(
param
[
"hospital"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert_error"
]
test_backend_data/hospital_data/__init__.py
0 → 100644
View file @
8026f680
test_backend_data/hospital_data/diary.yaml
0 → 100644
View file @
8026f680
diary
:
-
case
:
"
校验接口返回成功case"
hospital
:
"
bjxyjcpfbyy"
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