Commit 42320cc6 by zhaihuitao

update

parent fff0b935
...@@ -28,7 +28,8 @@ prod_appkey = "895c5256a7f47bd2cca88a29da9e978a" ...@@ -28,7 +28,8 @@ prod_appkey = "895c5256a7f47bd2cca88a29da9e978a"
event_interface = dict(install='/receive/tkio/install', loggedin='/receive/tkio/loggedin', event_interface = dict(install='/receive/tkio/install', loggedin='/receive/tkio/loggedin',
pageduration='/receive/tkio/pageduration', payment='/receive/tkio/payment', pageduration='/receive/tkio/pageduration', payment='/receive/tkio/payment',
order='/receive/tkio/order', register='/receive/tkio/register', order='/receive/tkio/order', register='/receive/tkio/register',
startup='/receive/tkio/startup', event='/receive/tkio/event') startup='/receive/tkio/startup', event='/receive/tkio/event',
appduration='/receive/tkio/appduration', adshow='/receive/tkio/adshow', adclick='/receive/tkio/adclick')
prod = { prod = {
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
import unittest import unittest
import json import json
import requests import requests
from config.envcfg import prod, headers from config.envcfg import prod_event_url, headers, event_interface
from config.prod.params import params_adclick from config.prod.params import params_adclick
class adclickTestCase(unittest.TestCase): class adclickTestCase(unittest.TestCase):
def testadclick(self): def testadclick(self):
r = requests.post(url=prod['events']['url'] + prod['events']['adclick'], data=json.dumps(params_adclick), headers=headers, timeout=5) r = requests.post(url=prod_event_url+event_interface["adclick"], data=json.dumps(params_adclick), headers=headers, timeout=5)
print("广告点击:" + r.text) print("广告点击:" + r.text)
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
import unittest import unittest
import json import json
import requests import requests
from config.envcfg import prod, headers from config.envcfg import prod_event_url, headers, event_interface
from config.prod.params import params_adshow from config.prod.params import params_adshow
class adshowTestCase(unittest.TestCase): class adshowTestCase(unittest.TestCase):
def testadshow(self): def testadshow(self):
r = requests.post(url=prod['events']['url'] + 'adshow', data=json.dumps(params_adshow), headers=headers, timeout=5) r = requests.post(url=prod_event_url+event_interface["adshow"], data=json.dumps(params_adshow), headers=headers, timeout=5)
print("\n广告展示:" + r.text) print("\n广告展示:" + r.text)
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
import unittest import unittest
import json import json
import requests import requests
from config.envcfg import prod, headers from config.envcfg import prod_event_url, headers, event_interface
from config.prod.params import params_appduration from config.prod.params import params_appduration
class appdurationTestCase(unittest.TestCase): class appdurationTestCase(unittest.TestCase):
def testappduration(self): def testappduration(self):
r = requests.post(url=prod['events']['url'] + 'appduration', data=json.dumps(params_appduration), headers=headers, timeout=5) r = requests.post(url=prod_event_url+event_interface["appduration"], data=json.dumps(params_appduration), headers=headers, timeout=5)
print("App使用时长:" + r.text) print("App使用时长:" + r.text)
if __name__ == "__main__": if __name__ == "__main__":
......
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