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
d1b233f4
Commit
d1b233f4
authored
May 06, 2021
by
taoke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tk_branch'
# Conflicts: # config.py # service/login.py
parents
3d8da894
07f344f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
config.py
+4
-2
service/login.py
+1
-1
No files found.
config.py
View file @
d1b233f4
...
@@ -7,15 +7,17 @@ class BaseConfig():
...
@@ -7,15 +7,17 @@ class BaseConfig():
# 当前运行的产品名
# 当前运行的产品名
current_product
=
"bmc"
current_product
=
"bmc"
default_test_case_dir
=
"test_case/bmc/"
default_test_case_dir
=
"test_case/bmc/"
salt
=
'hikcreate_xj'
# SSO的登录用的
salt
=
'hikcreate_xj'
# SSO 登录的东西
class
BMCConfig
(
BaseConfig
):
class
BMCConfig
(
BaseConfig
):
"""斑马信用app的配置类"""
"""斑马信用app的配置类"""
# 测试用例目录
# 测试用例目录
name
=
"bmc"
name
=
"bmc"
print
(
"a"
)
test_case_dir
=
"test_case/bmc/"
test_case_dir
=
"test_case/bmc/"
test_case_data_dir
=
"test_case_data/bmc/"
test_case_data_dir
=
"test_case_data/bmc/"
webhook
=
''
webhook
=
''
class
BmyConfig
(
BaseConfig
):
"""企业云的配置类"""
name
=
"bmy"
service/login.py
View file @
d1b233f4
...
@@ -70,6 +70,7 @@ class BMY():
...
@@ -70,6 +70,7 @@ class BMY():
imageinfo
=
BMY
()
.
get_imageCode
(
payload
[
'username'
],
payload
[
'password'
])
imageinfo
=
BMY
()
.
get_imageCode
(
payload
[
'username'
],
payload
[
'password'
])
payload
[
'imageId'
]
=
imageinfo
[
0
]
payload
[
'imageId'
]
=
imageinfo
[
0
]
payload
[
'imageCode'
]
=
imageinfo
[
1
]
payload
[
'imageCode'
]
=
imageinfo
[
1
]
# print(payload)
resp
=
requests
.
post
(
"http://testyun.banmago.com/api/auth/login"
,
data
=
payload
,
headers
=
header
)
resp
=
requests
.
post
(
"http://testyun.banmago.com/api/auth/login"
,
data
=
payload
,
headers
=
header
)
if
getToken
:
if
getToken
:
...
@@ -87,7 +88,6 @@ if __name__ == '__main__':
...
@@ -87,7 +88,6 @@ if __name__ == '__main__':
# headers=getattr(BaseConfig, 'headers'),
# headers=getattr(BaseConfig, 'headers'),
# method='post',
# method='post',
# data=None)
# data=None)
indata
=
{
"username"
:
"15150000000"
,
"password"
:
"A123456"
}
indata
=
{
"username"
:
"15150000000"
,
"password"
:
"A123456"
}
token
=
BMY
()
.
bmy_login
(
indata
,
getToken
=
True
)
token
=
BMY
()
.
bmy_login
(
indata
,
getToken
=
True
)
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