Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
API-Automation
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
文鑫
API-Automation
Commits
5dc2aa37
Commit
5dc2aa37
authored
Jul 01, 2020
by
文鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加值注释
parent
87bec304
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
test_DataA.py
+2
-1
No files found.
test_DataA.py
View file @
5dc2aa37
...
@@ -17,6 +17,7 @@ class TestSystem():
...
@@ -17,6 +17,7 @@ class TestSystem():
#测试删除数据源接口
#测试删除数据源接口
if
story
==
'删除mysql数据源'
or
story
==
'删除oracle数据源'
:
if
story
==
'删除mysql数据源'
or
story
==
'删除oracle数据源'
:
id
=
getSourceId
.
get_SourceId
(
data
)
id
=
getSourceId
.
get_SourceId
(
data
)
#将数据源id拼接在url地址上
url
=
url
+
id
url
=
url
+
id
r
=
requests
.
post
(
url
=
url
)
r
=
requests
.
post
(
url
=
url
)
#测试需要传递dataSourceId的接口
#测试需要传递dataSourceId的接口
...
@@ -26,7 +27,7 @@ class TestSystem():
...
@@ -26,7 +27,7 @@ class TestSystem():
r
=
requests
.
get
(
url
=
url
)
r
=
requests
.
get
(
url
=
url
)
#测试post接口
#测试post接口
elif
method
==
'post'
:
elif
method
==
'post'
:
json
=
eval
(
data
)
json
=
eval
(
data
)
#eval返回传入字符串的表达式的结果
r
=
requests
.
post
(
url
=
url
,
json
=
json
)
r
=
requests
.
post
(
url
=
url
,
json
=
json
)
#测试get接口
#测试get接口
elif
method
==
'get'
:
elif
method
==
'get'
:
...
...
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