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
95ba9a05
Commit
95ba9a05
authored
Apr 20, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Plain Diff
1
parents
da34ce1c
cfca6890
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
17 deletions
+40
-17
account_request.yaml
all_backend_api/account_request.yaml
+1
-0
web2_request.py
all_doctor_api/web2_request.py
+3
-3
web2_request.yaml
all_doctor_api/web2_request.yaml
+3
-2
host.yaml
host.yaml
+2
-2
base_request.py
in_common/base_request.py
+8
-1
login_session_function.py
login_session_function.py
+12
-1
login_session_function.yaml
login_session_function.yaml
+10
-7
service_list.yaml
test_doctor_data/web2_data/service_list.yaml
+1
-1
No files found.
all_backend_api/account_request.yaml
View file @
95ba9a05
...
...
@@ -9,5 +9,6 @@ login_vfc:
vfc_type
:
${vfc_type}
face_token
:
${face_token}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_doctor_api/web2_request.py
View file @
95ba9a05
...
...
@@ -13,5 +13,5 @@ class web2_request(BaseRequest):
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
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
))
\ No newline at end of file
all_doctor_api/web2_request.yaml
View file @
95ba9a05
...
...
@@ -6,4 +6,5 @@ service_list:
pagesize
:
${pagesize}
is_online
:
${is_online}
data
:
{}
json
:
{}
\ No newline at end of file
json
:
{}
isLogin
:
1
\ No newline at end of file
host.yaml
View file @
95ba9a05
develop_host
:
backend
:
http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env/
#
backend: http://backend.paas-develop.env
doctor
:
http://doctor.paas-develop.env
in_common/base_request.py
View file @
95ba9a05
...
...
@@ -62,6 +62,13 @@ class BaseRequest:
def
api_send
(
self
,
req
:
dict
):
host
=
self
.
api_load
(
path_setting
.
HOSTYAML_CONFIG
)
url_host
=
""
if
host
[
"develop_host"
]
.
get
(
"doctor"
)
==
"http://doctor.paas-develop.env"
:
url_host
=
host
[
'develop_host'
][
'doctor'
]
elif
host
[
"develop_host"
]
.
get
(
"backend"
)
==
"http://backend.paas-develop.env"
:
url_host
=
host
[
'develop_host'
][
'backend'
]
raw
=
yaml
.
dump
(
req
)
# 将一个python对象生成为yaml文档
for
key
,
value
in
self
.
params
.
items
():
raw
=
raw
.
replace
(
f
"${{{key}}}"
,
repr
(
value
))
...
...
@@ -75,7 +82,7 @@ class BaseRequest:
# 调用具体case的url
r
=
s
.
request
(
req
[
'method'
],
url
=
host
[
'develop_host'
][
'backend'
]
+
req
[
'url'
],
url
=
url_host
+
req
[
'url'
],
params
=
req
.
get
(
'params'
),
# headers=user_headers,
data
=
req
.
get
(
'data'
),
...
...
login_session_function.py
View file @
95ba9a05
...
...
@@ -36,7 +36,18 @@ class LoginFunction:
return
s
def
get_doctor_session
(
self
):
pass
url
=
self
.
host
[
"develop_host"
][
"doctor"
]
+
self
.
params
[
"doctor_login"
][
"url"
]
s
=
requests
.
session
()
r
=
s
.
request
(
self
.
params
[
"doctor_login"
][
"method"
],
url
=
url
,
params
=
self
.
params
[
"doctor_login"
][
"params"
],
data
=
self
.
params
[
"doctor_login"
][
"data"
],
headers
=
{
'Connection'
:
'close'
}
)
return
s
...
...
login_session_function.yaml
View file @
95ba9a05
...
...
@@ -9,11 +9,14 @@ backend_login:
vfc_type
:
face_token
:
#doctor_login:
# method: post
# url: /api
# params:
# a: "a"
# data:
# b: "b"
doctor_login
:
method
:
post
url
:
/api/web/account/login
params
:
{}
data
:
name
:
"
12345654321"
password
:
123456
method
:
password
csrfmiddlewaretoken
:
"
PKHywf6cMBZUkc5WfklO71bQNoMztAfv"
test_doctor_data/web2_data/service_list.yaml
View file @
95ba9a05
...
...
@@ -5,4 +5,4 @@ service_list:
page
:
"
1"
pagesize
:
"
10"
is_online
:
"
-1"
assert
:
"
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