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
8249fe3e
Commit
8249fe3e
authored
May 21, 2021
by
陈湘湘
Browse files
Options
Browse Files
Download
Plain Diff
一键登录
parents
1d5c7e53
304ba12a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
2 deletions
+93
-2
.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
+3
-0
base_request.py
in_common/base_request.py
+3
-0
path_setting.py
path_setting.py
+5
-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.
.gitignore
View file @
8249fe3e
.gitignore
host.yaml
base_request.py
# Byte-compiled / optimized / DLL files
# Byte-compiled / optimized / DLL files
__pycache__/
__pycache__/
*.py[cod]
*.py[cod]
...
@@ -102,4 +106,4 @@ venv.bak/
...
@@ -102,4 +106,4 @@ venv.bak/
/site
/site
# mypy
# mypy
.mypy_cache/
.mypy_cache/
\ No newline at end of file
all_backend_api/thirdphonelogin_request
0 → 100644
View file @
8249fe3e
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 @
8249fe3e
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 @
8249fe3e
develop_host
:
develop_host
:
backend
:
http://backend.paas-develop.env
backend
:
http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
# doctor: http://doctor.paas-develop.env
<<<<<<< HEAD
# backend: https://backend.igengmei.com
# backend: https://backend.igengmei.com
=======
>
>>>>>>
cxx
in_common/base_request.py
View file @
8249fe3e
...
@@ -100,7 +100,10 @@ class BaseRequest:
...
@@ -100,7 +100,10 @@ class BaseRequest:
# headers=user_headers,
# headers=user_headers,
data
=
req
.
get
(
'data'
),
data
=
req
.
get
(
'data'
),
json
=
req
.
get
(
'json'
),
json
=
req
.
get
(
'json'
),
<<<<<<<
HEAD
# proxies={"http":"172.30.9.226:8888"}
# proxies={"http":"172.30.9.226:8888"}
=======
>>>>>>>
cxx
)
)
return
r
.
json
()
return
r
.
json
()
...
...
path_setting.py
View file @
8249fe3e
...
@@ -103,6 +103,7 @@ MY_CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/my_conv
...
@@ -103,6 +103,7 @@ MY_CONVERSATION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/my_conv
HOME_V5_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"service_request.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"
)
HOME_V5
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/service_data"
,
"home_v5.yaml"
)
<<<<<<<
HEAD
PERSONAL_CENTER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
PERSONAL_CENTER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
PERSONAL_CENTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"personal_center.yaml"
)
PERSONAL_CENTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"personal_center.yaml"
)
...
@@ -165,6 +166,10 @@ COMMUNITY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "
...
@@ -165,6 +166,10 @@ COMMUNITY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "
#品类聚合页面标签和专场
#品类聚合页面标签和专场
POLYMER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
POLYMER_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_request.yaml"
)
POLYMER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"polymer.yaml"
)
POLYMER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"polymer.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"
)
>>>>>>>
cxx
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
test_backend_case/account_case/test_thirdPhone_login.py
0 → 100644
View file @
8249fe3e
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 @
8249fe3e
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