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
e7186fe0
Commit
e7186fe0
authored
Apr 16, 2021
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doctor 后台提交
parent
42c6066e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
61 additions
and
0 deletions
+61
-0
__init__.py
all_doctor_api/__init__.py
+0
-0
web2_request.py
all_doctor_api/web2_request.py
+18
-0
web2_request.yaml
all_doctor_api/web2_request.yaml
+10
-0
path_setting.py
path_setting.py
+2
-0
__init__.py
test_doctor_case/__init__.py
+0
-0
__init__.py
test_doctor_case/web2_case/__init__.py
+0
-0
test_service_list.py
test_doctor_case/web2_case/test_service_list.py
+23
-0
__init__.py
test_doctor_data/__init__.py
+0
-0
__init__.py
test_doctor_data/web2_data/__init__.py
+0
-0
service_list.yaml
test_doctor_data/web2_data/service_list.yaml
+8
-0
No files found.
all_doctor_api/__init__.py
0 → 100644
View file @
e7186fe0
all_doctor_api/web2_request.py
0 → 100644
View file @
e7186fe0
import
path_setting
from
in_common.base_request
import
BaseRequest
class
web2_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
SERVICE_URL
)
def
service_list
(
self
,
page
,
pagesize
,
is_online
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"pagesize"
]
=
pagesize
self
.
params
[
"is_online"
]
=
is_online
return
self
.
api_send
(
self
.
data
[
"service_list"
])
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
))
\ No newline at end of file
all_doctor_api/web2_request.yaml
0 → 100644
View file @
e7186fe0
service_list
:
method
:
get
url
:
/api/web2/service/list
params
:
page
:
${page}
pagesize
:
${pagesize}
is_online
:
${is_online}
data
:
{}
json
:
{}
\ No newline at end of file
path_setting.py
View file @
e7186fe0
...
...
@@ -6,6 +6,8 @@ sys.path.append(BASE_DIR)
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"
)
SERVICE_DATA
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"service_list.yaml"
)
SERVICE_URL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_doctor_api"
,
"web2_request.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
HOSTYAML_CONFIG
)
test_doctor_case/__init__.py
0 → 100644
View file @
e7186fe0
test_doctor_case/web2_case/__init__.py
0 → 100644
View file @
e7186fe0
test_doctor_case/web2_case/test_service_list.py
0 → 100644
View file @
e7186fe0
import
pytest
import
path_setting
from
all_doctor_api.web2_request
import
web2_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestServiceList
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_DATA
)
ServiceList_case
,
ServiceList_data
=
get_ids
(
data
,
"service_list"
)
@pytest.mark.parametrize
(
"params"
,
ServiceList_data
,
ids
=
ServiceList_case
)
def
test_ServiceList
(
self
,
params
):
r
=
web2_request
()
.
service_list
(
params
[
'page'
],
params
[
'pagesize'
],
params
[
'is_online'
])
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"page"
]
==
params
[
"assert"
]
elif
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
params
[
"assert"
]
# else:
# assert r['error'] == 0
\ No newline at end of file
test_doctor_data/__init__.py
0 → 100644
View file @
e7186fe0
test_doctor_data/web2_data/__init__.py
0 → 100644
View file @
e7186fe0
test_doctor_data/web2_data/service_list.yaml
0 → 100644
View file @
e7186fe0
service_list
:
#有数据返回
-
case
:
"
数据"
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
-1"
assert
:
"
1"
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