Commit 369b0e02 by zhaihuitao

add install enevt

parent b24aa8e0
...@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment