Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interfaceTest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
zhaihuitao
interfaceTest
Commits
369b0e02
Commit
369b0e02
authored
4 years ago
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add install enevt
parent
b24aa8e0
master
…
dev2021
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
test_install.py
testcase/android_events/test_install.py
+6
-9
No files found.
testcase/android_events/test_install.py
View file @
369b0e02
...
...
@@ -8,17 +8,15 @@
import
requests
import
json
import
unittest
from
config.envcfg
import
prod
,
headers
from
config.envcfg
import
prod
,
headers
from
config.prod.params
import
params_install
#headers = {'Content-Type': 'application/json'}
class
installTestCase
(
unittest
.
TestCase
):
def
testinstall
(
self
):
p
=
requests
.
post
(
url
=
prod
[
"events"
][
"url"
]
+
'install'
,
data
=
json
.
dumps
(
params_install
),
headers
=
headers
,
timeout
=
5
)
print
(
"激活事件执行结果:"
+
p
.
text
)
print
(
p
.
url
)
self
.
assertEqual
(
p
.
status_code
,
200
,
msg
=
"执行失败,请检查"
)
r
=
requests
.
post
(
url
=
prod
[
"events"
][
"url"
]
+
'install'
,
data
=
json
.
dumps
(
params_install
),
headers
=
headers
)
print
(
"激活事件执行结果:"
+
r
.
text
)
print
(
r
.
url
)
self
.
assertEqual
(
r
.
status_code
,
200
,
msg
=
"执行失败,请检查"
)
if
__name__
==
"__main__"
:
unittest
.
main
()
\ No newline at end of file
unittest
.
main
()
This diff is collapsed.
Click to expand it.
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