Commit bcf1020a by zhaihuitao

update

parent 42320cc6
......@@ -23,8 +23,11 @@ print(base_path)
prod_click_url = 'http://uri6.com/tkio/Er6BFna'
prod_event_url = 'http://log.trackingio.com'
prod_appkey = "895c5256a7f47bd2cca88a29da9e978a"
# prod_event_url = 'http://log.trackingio.com'
prod_event_url = 'http://10.3.20.42:8080'
test_event_url = 'http://10.3.20.42:8080'
# prod_appkey = "0d401839250deff23daf62fd49a444cb"
prod_appkey = "0d401839250deff23daf62fd49a444cb"
event_interface = dict(install='/receive/tkio/install', loggedin='/receive/tkio/loggedin',
pageduration='/receive/tkio/pageduration', payment='/receive/tkio/payment',
order='/receive/tkio/order', register='/receive/tkio/register',
......
......@@ -93,31 +93,40 @@ params_install = {
}
params_startup = {
# 'what': 'startup',
'what': 'startup',
'appid': prod_appkey,
'context': {
'_deviceid': "CFFEF74E-B6BF-BD16-E7F8-DFDBFF5FB6E1",
'_imei': "cffef74e-b6bf-bd16-e7f8-dfdbff5fb6e1",
'_androidid': "43214532142142",
# '_imei': "cffef74e-b6bf-bd16-e7f8-dfdbff5fb6e1",
# '_androidid': "43214532142142",
'_ip': "119.57.108.226",
'_timestamp': int(round(time.time() * 1000)),
"_lib_version": "1.5.0",
# "_campaignid": 'default',
"_campaignid": 'default',
# "_deviceid": i,
# "_imei": i,
# # "_idfa": '75463565745634546',
"_idfa": 'CFFEF74E-B6BF-BD16-E7F8-DFDBFF5FB6E1',
# "_androidid": "424653325643",
# # "_imei2":"324323AAAA",
# # "_meid": "CCC324323",
# "_ip": IP,
# # "_ipv6": i,
# '_manufacturer': manufacturer,
# '_ryos': ryos,
# '_rydevicetype': rydevicetype,
# '_network': network,
# '_resolution': resolution,
# '_op': op,
# '_timestamp': current_time_13,
"_ipv6": randomUtil.r.randip(),
'_manufacturer': "iphone",
'_ryos': "IOS",
'_rydevicetype': "iphone11",
'_network': "wifi",
'_resolution': "1344*750",
'_op': "中国移动",
'_timestamp': int(round(time.time() * 1000)),
"sysfsize": "128",
"_model": "CHZN",
"sysram": "6G",
"_ryosversion": "iphone11",
"sysutime": "2019-12-12",
"sysuname": "apple",
"_carrier": "中国电信",
"syscountryc": "CN",
"sysrtime": "2020-09-21"
# '_oaid': '999b6e3e-a274-ed22-cebf-2b6dddfc29b7'
# # '_mac':"565354131606"
......
......@@ -16,7 +16,7 @@ from config.prod.params import params_register
class registerTestCase(unittest.TestCase):
def testregister(self):
p = requests.post(url=prod_event_url+ 'register', data=json.dumps(params_register), headers=headers, timeout=10)
p = requests.post(url=prod_event_url+event_interface["register"], data=json.dumps(params_register), headers=headers, timeout=10)
# print("注册时间戳"+current_time_13)
print("注册" + p.text)
......
......@@ -9,13 +9,13 @@
import unittest
import json
import requests
from config.envcfg import prod, headers
from config.envcfg import test_event_url, headers, event_interface
from config.prod.params import params_startup
class startupTestCase(unittest.TestCase):
def teststartup(self):
r = requests.post(url=prod['events']['url'] + 'startup', data=json.dumps(params_startup), headers=headers, timeout=10)
r = requests.post(url=test_event_url+event_interface["startup"], data=json.dumps(params_startup), headers=headers, timeout=10)
print(r.text+"\n"+r.url)
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