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
d34c09be
Commit
d34c09be
authored
Apr 16, 2021
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医院主页详情接口自动化
parent
42c6066e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
121 additions
and
0 deletions
+121
-0
hospitals_request.py
all_backend_api/hospitals_request.py
+16
-0
hospitals_request.yaml
all_backend_api/hospitals_request.yaml
+7
-0
path_setting.py
path_setting.py
+4
-0
__init__.py
test_backend_case/hospitals_case/__init__.py
+0
-0
test_detail.py
test_backend_case/hospitals_case/test_detail.py
+28
-0
__init__.py
test_backend_data/hospitals_data/__init__.py
+0
-0
detail.yaml
test_backend_data/hospitals_data/detail.yaml
+66
-0
No files found.
all_backend_api/hospitals_request.py
0 → 100644
View file @
d34c09be
import
path_setting
from
in_common.base_request
import
BaseRequest
class
hospitals_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
HDYAML_CONFIG
)
def
detail
(
self
):
return
self
.
api_send
(
self
.
data
[
"detail"
])
if
__name__
==
'__main__'
:
print
(
hospitals_request
()
.
detail
())
\ No newline at end of file
all_backend_api/hospitals_request.yaml
0 → 100644
View file @
d34c09be
detail
:
method
:
get
url
:
/api/hospitals/bjxyjcpfbyy/detail
params
:
{}
data
:
{}
json
:
{}
path_setting.py
View file @
d34c09be
...
...
@@ -7,5 +7,9 @@ HOSTYAML_CONFIG = os.path.join(BASE_DIR, "backend_auto", "host.yaml")
APYAML_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"account_request.yaml"
)
LOGIN_VFC
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"login_vfc.yaml"
)
#医院主页详情
HDYAML_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hospitals_request.yaml"
)
HOSPITAL_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hospitals_data"
,
"detail.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
HOSTYAML_CONFIG
)
test_backend_case/hospitals_case/__init__.py
0 → 100644
View file @
d34c09be
test_backend_case/hospitals_case/test_detail.py
0 → 100644
View file @
d34c09be
import
pytest
from
all_backend_api.hospitals_request
import
hospitals_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
.
HOSPITAL_DETAIL
)
detail_case
,
detail_data
=
get_ids
(
data
,
"detail"
)
@pytest.mark.parametrize
(
"param"
,
detail_data
,
ids
=
detail_case
)
def
test_detail
(
self
,
param
):
r
=
hospitals_request
()
.
detail
()
assert
r
[
"error"
]
==
param
[
"assert_error"
]
assert
r
[
"data"
][
"base_info"
][
"hospital_name"
]
==
param
[
"assert"
]
assert
r
[
"data"
][
"base_info"
][
"good_at"
][
0
]
==
param
[
"assert1"
]
assert
r
[
"data"
][
"base_info"
][
"hospital_type"
]
==
param
[
"assert2"
]
assert
r
[
"data"
][
"buy_related"
][
"gifts"
][
0
][
"gift_id"
]
==
param
[
"assert3"
]
assert
r
[
"data"
][
"tab"
]
==
param
[
"assert4"
]
assert
r
[
"data"
][
"image_header_area"
][
"hospital_images"
][
0
]
==
param
[
"assert5"
]
test_backend_data/hospitals_data/__init__.py
0 → 100644
View file @
d34c09be
test_backend_data/hospitals_data/detail.yaml
0 → 100644
View file @
d34c09be
detail
:
#校验成功case
-
case
:
"
校验接口调用成功case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验医院名称case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验明星项目case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验医院类型case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验优惠券返回case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验tab返回case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
-
case
:
"
校验医院图片case"
assert_error
:
0
assert
:
"
北京嘉禾医疗美容"
assert1
:
"
私密修复"
assert2
:
"
民营"
assert3
:
56895
assert4
:
{
index
:
true
,
service
:
true
,
doctor
:
true
,
publish
:
false
,
doctor_say
:
false
,
diary
:
true
,
answer
:
false
}
assert5
:
"
https://heras.igengmei.com/doctor/2020/07/29/ef19b5fa94-w"
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