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
Aug 17, 2020
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add install enevt
parent
b24aa8e0
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 @@
...
@@ -8,17 +8,15 @@
import
requests
import
requests
import
json
import
json
import
unittest
import
unittest
from
config.envcfg
import
prod
,
headers
from
config.envcfg
import
prod
,
headers
from
config.prod.params
import
params_install
from
config.prod.params
import
params_install
#headers = {'Content-Type': 'application/json'}
class
installTestCase
(
unittest
.
TestCase
):
class
installTestCase
(
unittest
.
TestCase
):
def
testinstall
(
self
):
def
testinstall
(
self
):
p
=
requests
.
post
(
url
=
prod
[
"events"
][
"url"
]
+
'install'
,
data
=
json
.
dumps
(
params_install
),
headers
=
headers
,
timeout
=
5
)
r
=
requests
.
post
(
url
=
prod
[
"events"
][
"url"
]
+
'install'
,
data
=
json
.
dumps
(
params_install
),
headers
=
headers
)
print
(
"激活事件执行结果:"
+
p
.
text
)
print
(
"激活事件执行结果:"
+
r
.
text
)
print
(
p
.
url
)
print
(
r
.
url
)
self
.
assertEqual
(
p
.
status_code
,
200
,
msg
=
"执行失败,请检查"
)
self
.
assertEqual
(
r
.
status_code
,
200
,
msg
=
"执行失败,请检查"
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
()
unittest
.
main
()
\ No newline at end of file
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