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
6e5c8585
Commit
6e5c8585
authored
May 08, 2021
by
fanxun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改sso config
parent
cd58c334
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
config.py
+1
-1
test_case/sso/conftest.py
+1
-2
No files found.
config.py
View file @
6e5c8585
...
@@ -20,7 +20,7 @@ class BaseConfig():
...
@@ -20,7 +20,7 @@ class BaseConfig():
sso_username
=
'robot_fanxun'
# SSO登录名
sso_username
=
'robot_fanxun'
# SSO登录名
sso_password
=
'fx123456'
# sso密码
sso_password
=
'fx123456'
# sso密码
sso_url
=
r'http://testtbdzj.hikcreate.com/web/auth/users/login'
# sso登录地址
sso_url
=
r'http://testtbdzj.hikcreate.com/web/auth/users/login'
# sso登录地址
salt
=
'hikcreate_xj'
# SSO盐值
s
so_s
alt
=
'hikcreate_xj'
# SSO盐值
sso_token
=
''
sso_token
=
''
...
...
test_case/sso/conftest.py
View file @
6e5c8585
...
@@ -8,7 +8,7 @@ from common.tools import request_main
...
@@ -8,7 +8,7 @@ from common.tools import request_main
@pytest.fixture
(
scope
=
'module'
,
autouse
=
True
)
@pytest.fixture
(
scope
=
'module'
,
autouse
=
True
)
def
sso_login
():
def
sso_login
():
"""SSO登录获取token"""
"""SSO登录获取token"""
encrypted_password
=
Encryption
()
.
get_md5
(
BaseConfig
.
sso_password
,
salt
=
BaseConfig
.
salt
)
encrypted_password
=
Encryption
()
.
get_md5
(
BaseConfig
.
sso_password
,
salt
=
BaseConfig
.
s
so_s
alt
)
req_data
=
{
"loginName"
:
BaseConfig
.
sso_username
,
"password"
:
encrypted_password
}
req_data
=
{
"loginName"
:
BaseConfig
.
sso_username
,
"password"
:
encrypted_password
}
res
=
request_main
(
BaseConfig
.
sso_url
,
headers
=
None
,
method
=
'post'
,
data
=
req_data
)
res
=
request_main
(
BaseConfig
.
sso_url
,
headers
=
None
,
method
=
'post'
,
data
=
req_data
)
setattr
(
BaseConfig
,
'sso_token'
,
res
[
'data'
][
'token'
])
setattr
(
BaseConfig
,
'sso_token'
,
res
[
'data'
][
'token'
])
...
@@ -17,4 +17,3 @@ def sso_login():
...
@@ -17,4 +17,3 @@ def sso_login():
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