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
5c8e7ad1
Commit
5c8e7ad1
authored
May 07, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试
parent
f899f3da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
test_case/bmy/test_login.py
+4
-1
test_case_data/bmy/bmy_case.xlsx
+0
-0
No files found.
test_case/bmy/test_login.py
View file @
5c8e7ad1
...
...
@@ -28,6 +28,7 @@ class TestLogin():
"""处理"""
authorization
=
BMY
()
.
get_authorization
()
#
headers
[
"Authorization"
]
=
authorization
# print("我是header",headers)
# 密码加密
password_Encrypted
=
BMY
()
.
pwd_encrypted
(
req_data
[
'password'
])
req_data
[
'password'
]
=
password_Encrypted
...
...
@@ -37,10 +38,12 @@ class TestLogin():
req_data
[
'imageCode'
]
=
imageinfo
[
1
]
req_data
[
'grant_type'
]
=
"passwordImageCode"
# print("我是请求参数",req_data)
"""请求"""
# res = request_main(f"http://testyun.banmago.com/api{url}", headers, method, req_data)
res
=
requests
.
post
(
f
"http://testyun.banmago.com/api{url}"
,
data
=
req_data
,
headers
=
headers
)
#
print(res.json())
print
(
res
.
json
())
"""断言"""
assert
res
.
json
()[
'code'
]
==
expectData
[
'code'
]
...
...
test_case_data/bmy/bmy_case.xlsx
View file @
5c8e7ad1
No preview for this file type
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