Commit 8416dcaa by zhaihuitao

update

parent bcf1020a
......@@ -17,17 +17,17 @@ sys.path.append(base_path)
# 生产环境:
path = "/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/config/setting/config.ini"
rc = read_config(path)
url = rc.get("env", "prod_click_url")
url = rc.get("env", "click_url")
print(url)
print(base_path)
prod_click_url = 'http://uri6.com/tkio/Er6BFna'
click_url = 'http://uri6.com/tkio/Er6BFna'
# 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"
prod_appkey = "57ed2dd31596bb4682471e82c0c73c1a"
# prod_appkey = "57ed2dd31596bb4682471e82c0c73c1a"
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',
......
[env]
prod_click_url = http://uri6.com/tkio/Er6BFna
click_url = http://uri6.com/tkio/Er6BFna
prod_event_url = http://log.trackingio.com
prod_appkey = 895c5256a7f47bd2cca88a29da9e978a
event_interface = {"events": ['/receive/tkio/install']}
\ No newline at end of file
......@@ -7,7 +7,7 @@
"""
import unittest
from config.envcfg import prod_click_url
from config.envcfg import click_url
from config.prod.params import params_click
import requests
import os
......@@ -19,7 +19,7 @@ sys.path.append(base_path)
class clickTestCase(unittest.TestCase):
def testclick(self):
p = requests.get(url=prod_click_url, params=params_click, timeout=30, verify=False)
p = requests.get(url=click_url, params=params_click, timeout=30, verify=False)
# self.assertEqual(p.status_code, 300, msg='接口异常,请检查')
print('执行结果:\n=================')
print(p)
......
......@@ -17,7 +17,6 @@ class loninTestCase(unittest.TestCase):
def testlogin(self):
r = requests.post(url=prod_event_url+event_interface["loggedin"], data=json.dumps(params_login), headers=headers, timeout=10)
print("登录" + r.text)
print(prod_event_url+event_interface[1])
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -9,13 +9,13 @@
import unittest
import json
import requests
from config.envcfg import test_event_url, headers, event_interface
from config.envcfg import prod_event_url, headers, event_interface
from config.prod.params import params_startup
class startupTestCase(unittest.TestCase):
def teststartup(self):
r = requests.post(url=test_event_url+event_interface["startup"], data=json.dumps(params_startup), headers=headers, timeout=10)
r = requests.post(url=prod_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