Commit 46d95e31 by zhaihuitao

update

parent 46607fa6
......@@ -14,10 +14,7 @@ import time
# 生产环境:
prod = {
"click": {
"url": "http://t.uri6.com/tkio/EFbIzya?noredirect=true",
"appkey": "9b17c1568c3ce34599c5fd2778483ff9"
},
"click": ["http://t.uri6.com/tkio/EFbIzya?noredirect=true", "9b17c1568c3ce34599c5fd2778483ff9"],
"events": {
"url": "http://tlog.trackingio.com/receive/tkio/",
# "url": "http://10.3.20.42:8080",
......
......@@ -61,14 +61,14 @@ for _ in range(1):
#timeout可以超时四秒
# verify = False
p = requests.get(url=prod['click']['url'], params=prod_params, timeout=30, verify=False)
p = requests.get(url=prod['click'][1], params=prod_params, timeout=30, verify=False)
print('success:', s)
# print(p.text)
print('imei:',randomUtil.r.randimei())
except requests.exceptions.RequestException:
print('wrong:',w)
print('wrong:', w)
print('imei:', randomUtil.r.randimei())
print('ip', randomUtil.r.randip())
w=w+1
......
......@@ -19,18 +19,11 @@ sys.path.append(base_path)
class clickTestCase(unittest.TestCase):
def click(self):
try:
p = requests.get(url=prod['click']['url'], params=params_click, timeout=30, verify=False)
# self.assertEqual(p.status_code, 200, msg='接口异常,请检查')
print(prod['click']['url'])
def testclick(self):
p = requests.get(url=prod['click'][1], params=params_click, timeout=30, verify=False)
self.assertEqual(p.status_code, 300, msg='接口异常,请检查')
print('执行结果:\n=================')
print(p)
print('imei:', randomUtil.r.randimei())
except requests.exceptions.RequestException:
print('imei:', randomUtil.r.randimei())
print('ip', randomUtil.r.randip())
# time.sleep(7)
# try:
# allEvent().installUpload(randomUtil.r.randimei(), randomUtil.r.randip(), prod['events']['appkey'], prod['cmpaignid'])
......
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