Commit c772a412 by taoke

交委调试

parent 227bd1ab
...@@ -67,10 +67,10 @@ def build_headers(headers, has_token): ...@@ -67,10 +67,10 @@ def build_headers(headers, has_token):
if headers == None or headers == "": if headers == None or headers == "":
headers = SSOConfig.headers headers = SSOConfig.headers
headers['token'] = SSOConfig.sso_token headers['token'] = SSOConfig.sso_token
# 交委 # 交委(监管端的token和企业端的Authorization都装在一起)
elif name == SafeTransportationConfig.name: elif name == SafeTransportationConfig.name:
if headers == None or headers == "": if headers == None or headers == "":
headers = SafeTransportationConfig.sso_headers headers = SafeTransportationConfig.headers
headers['token'] = SafeTransportationConfig.sso_token headers['token'] = SafeTransportationConfig.sso_token
headers['Authorization'] = SafeTransportationConfig.bmy_token headers['Authorization'] = SafeTransportationConfig.bmy_token
return headers return headers
......
...@@ -160,7 +160,7 @@ class SafeTransportationConfig(BaseConfig): ...@@ -160,7 +160,7 @@ class SafeTransportationConfig(BaseConfig):
test_host = "http://testyun.banmago.com/api" test_host = "http://testyun.banmago.com/api"
test_name_password = {"username": "15150000000", "password": "A123456", "Register-Origin": "yun"} test_name_password = {"username": "15150000000", "password": "A123456", "Register-Origin": "yun"}
bmy_token = '' bmy_token = ''
bmy_headers = {"Content-Type": "application/json", headers = {"Content-Type": "application/json",
"Authorization":bmy_token} "Authorization":bmy_token}
# sso # sso
sso_username = 'robot_fanxun' # SSO登录名 sso_username = 'robot_fanxun' # SSO登录名
...@@ -168,5 +168,5 @@ class SafeTransportationConfig(BaseConfig): ...@@ -168,5 +168,5 @@ class SafeTransportationConfig(BaseConfig):
sso_url = r'http://testtbdzj.hikcreate.com/web/auth/users/login' # sso登录地址 sso_url = r'http://testtbdzj.hikcreate.com/web/auth/users/login' # sso登录地址
sso_salt = 'hikcreate_xj' # SSO盐值 sso_salt = 'hikcreate_xj' # SSO盐值
sso_token = '' sso_token = ''
sso_headers = {'Content-Type': 'application/json', headers = {'Content-Type': 'application/json',
"appCode": "1422744796822036481"} # 应用code "appCode": "1422744796822036481"} # 应用code
...@@ -18,11 +18,11 @@ class TestRiskManagement(): ...@@ -18,11 +18,11 @@ class TestRiskManagement():
# print(res.json()) # print(res.json())
"""使用公共方法""" """使用公共方法"""
# res=request_main("http://testyun.banmago.com/api/tbd/web/baseData/intoVehicle/list", res=request_main("http://testyun.banmago.com/api/tbd/web/baseData/intoVehicle/list",
# "", "",
# "POST", "POST",
# {"appCode":"1422744796822036481","pageNum":1,"pageSize":10,"useNaturePropertyIds":[]}) {"appCode":"1422744796822036481","pageNum":1,"pageSize":10,"useNaturePropertyIds":[]})
# print(res) print(res)
def test_jgd(self): def test_jgd(self):
print("测试") print("测试")
......
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