Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InterfaceAutoTest
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TestAuto
InterfaceAutoTest
Commits
c16ed66c
Commit
c16ed66c
authored
May 08, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业云账号密码配置化
parent
8cb294fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
config.py
+1
-0
service/login.py
+10
-10
No files found.
config.py
View file @
c16ed66c
...
@@ -40,5 +40,6 @@ class BmyConfig(BaseConfig):
...
@@ -40,5 +40,6 @@ class BmyConfig(BaseConfig):
defaultToken
=
"Basic aHpjcF93ZWI6MTIzNDU2"
# 获取token 原始token
defaultToken
=
"Basic aHpjcF93ZWI6MTIzNDU2"
# 获取token 原始token
# 测试环境
# 测试环境
test_host
=
"http://testyun.banmago.com/api"
test_host
=
"http://testyun.banmago.com/api"
test_name_password
=
{
"username"
:
"15151500000"
,
"password"
:
"bmy123456"
}
service/login.py
View file @
c16ed66c
...
@@ -9,7 +9,7 @@ from common.db import RedisString
...
@@ -9,7 +9,7 @@ from common.db import RedisString
from
config
import
BmyConfig
from
config
import
BmyConfig
@pytest.fixture
(
scope
=
'session'
)
#
@pytest.fixture(scope='session')
class
SSOLogin
():
class
SSOLogin
():
"""SSO登录"""
"""SSO登录"""
def
_sso_pwd_encrypted
(
self
,
org_pwd
):
def
_sso_pwd_encrypted
(
self
,
org_pwd
):
...
@@ -113,12 +113,12 @@ class BMY():
...
@@ -113,12 +113,12 @@ class BMY():
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# SSO登录测试
#
#
SSO登录测试
sso_token
=
SSOLogin
()
.
sso_login
(
url
=
BaseConfig
.
sso_url
,
#
sso_token = SSOLogin().sso_login(url=BaseConfig.sso_url,
method
=
'post'
,)
#
method='post',)
print
(
sso_token
)
#
print(sso_token)
# BMY登录
# indata= {"username":"15150000000","password":"A123456"}
indata
=
BmyConfig
.
test_name_password
#
token= BMY().bmy_login(indata,getToken=False)
token
=
BMY
()
.
bmy_login
(
indata
,
getToken
=
False
)
#
print(token)
print
(
token
)
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