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
304ba12a
Commit
304ba12a
authored
May 21, 2021
by
陈湘湘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一键登录
parent
cfca6890
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
5 deletions
+88
-5
.DS_Store
.DS_Store
+0
-0
.gitignore
.gitignore
+5
-2
thirdphonelogin_request
all_backend_api/thirdphonelogin_request
+10
-0
thirdphonelogin_request.py
all_backend_api/thirdphonelogin_request.py
+17
-0
host.yaml
host.yaml
+2
-2
base_request.py
in_common/base_request.py
+1
-1
path_setting.py
path_setting.py
+3
-0
.DS_Store
test_backend_case/.DS_Store
+0
-0
test_thirdPhone_login.py
test_backend_case/account_case/test_thirdPhone_login.py
+21
-0
login_thirdphone
test_backend_data/account_data/login_thirdphone
+29
-0
No files found.
.DS_Store
View file @
304ba12a
No preview for this file type
.gitignore
View file @
304ba12a
.gitignore
host.yaml
base_request.py
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
...
...
@@ -102,4 +106,4 @@ venv.bak/
/site
# mypy
.mypy_cache/
\ No newline at end of file
.mypy_cache/
all_backend_api/thirdphonelogin_request
0 → 100644
View file @
304ba12a
login_thirdphone:
method: post
url: /api/account/login/third_phone_login
params:
version: ${version}
data:
phone_data: ${phone_data}
phone_from_type: ${phone_from_type}
json: {}
\ No newline at end of file
all_backend_api/thirdphonelogin_request.py
0 → 100644
View file @
304ba12a
import
path_setting
from
in_common.base_request
import
BaseRequest
class
thirdphonelogin_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
thirdphonelogin
=
self
.
api_load
(
path_setting
.
THIRD_PHONE_LOGIN_CONFIG
)
def
thirdphone_login
(
self
,
version
,
phone_data
,
phone_from_type
):
self
.
params
[
"version"
]
=
version
self
.
params
[
"phone_data"
]
=
phone_data
self
.
params
[
"phone_from_type"
]
=
phone_from_type
return
self
.
api_send
(
self
.
thirdphonelogin
[
"login_thirdphone"
])
host.yaml
View file @
304ba12a
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 @
304ba12a
...
...
@@ -86,7 +86,7 @@ class BaseRequest:
params
=
req
.
get
(
'params'
),
# headers=user_headers,
data
=
req
.
get
(
'data'
),
json
=
req
.
get
(
'json'
)
json
=
req
.
get
(
'json'
)
,
)
return
r
.
json
()
...
...
path_setting.py
View file @
304ba12a
...
...
@@ -36,6 +36,9 @@ HOSPITAL_DOCTOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hospita
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"
)
THIRD_PHONE_LOGIN_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"thirdphonelogin_request"
)
THIRD_PHONE_LOGIN
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/account_data"
,
"login_thirdphone"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
HOSTYAML_CONFIG
)
test_backend_case/.DS_Store
View file @
304ba12a
No preview for this file type
test_backend_case/account_case/test_thirdPhone_login.py
0 → 100644
View file @
304ba12a
from
in_common.base_request
import
BaseRequest
import
path_setting
from
ids_list
import
get_ids
import
pytest
from
all_backend_api.thirdphonelogin_request
import
*
class
TestThirdPhoneLogin
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
THIRD_PHONE_LOGIN
)
thirdphonelogin_case
,
thirdphonelogin_data
=
get_ids
(
data
,
"login_thirdphone"
)
@pytest.mark.parametrize
(
"param"
,
thirdphonelogin_data
,
ids
=
thirdphonelogin_case
)
def
test_thirdphone_login
(
self
,
param
):
r
=
thirdphonelogin_request
()
.
thirdphone_login
(
param
[
"version"
],
param
[
"phone_data"
],
param
[
"phone_from_type"
])
if
r
[
"error"
]
==
1
:
assert
r
[
'message'
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/account_data/login_thirdphone
0 → 100644
View file @
304ba12a
login_thirdphone:
- case: "无版本号手机号一键登录case"
phone_data: '{
"token" : "A4-lVEf_Fk2ekkxSFgSZ59yD6bPaIxHWzJfsGgaEBDrbZzFyxMueOODIoBeXXQuHU8REjG42jvyjQa2a3rkDm8ufKlI8DL3ny2FfxnUrnuQOycWRaHKN3664onbOetr54dvb4wkVaV7X33yBlw7u_ZCNqIOwTnRQ9kPgHDBpvyN4NTdYYf2tJWhF4VeiVOqc7OiRz-Nzt08AUvbtWpw6sPQjA==",
"appId" : "xK5yFMfJ"
}'
phone_from_type: 1
version:
assert: "获取手机号失败"
- case: "大于7.32手机号一键登录case"
phone_data: '{
"token" : "A4-lVEf_Fk2ekkxSFgSZ59yD6bPaIxHWzJfsGgaEBDrbZzFyxMueOODIoBeXXQuHU8REjG42jvyjQa2a3rkDm8ufKlI8DL3ny2FfxnUrnuQOycWRaHKN3664onbOetr54dvb4wkVaV7X33yBlw7u_ZCNqIOwTnRQ9kPgHDBpvyN4NTdYYf2tJWhF4VeiVOqc7OiRz-Nzt08AUvbtWpw6sPQjA==",
"appId" : "xK5yFMfJ"
}'
phone_from_type: 1
version: "7.43.0"
assert: "获取手机号失败"
- case: "小于7.32手机号一键登录case"
phone_data: '{
"token" : "A4-lVEf_Fk2ekkxSFgSZ59yD6bPaIxHWzJfsGgaEBDrbZzFyxMueOODIoBeXXQuHU8REjG42jvyjQa2a3rkDm8ufKlI8DL3ny2FfxnUrnuQOycWRaHKN3664onbOetr54dvb4wkVaV7X33yBlw7u_ZCNqIOwTnRQ9kPgHDBpvyN4NTdYYf2tJWhF4VeiVOqc7OiRz-Nzt08AUvbtWpw6sPQjA==",
"appId" : "xK5yFMfJ"
}'
phone_from_type: 1
version: "7.32.0"
assert: "获取手机号失败"
\ 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