diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-05-05 15:52:01 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-05-05 15:52:01 -0230 |
commit | b61582b1c6b16be4339aa0bded3ad8f542a01df9 (patch) | |
tree | 2040386a942217e2412e48c1e56465817ecac3d5 /python/test | |
parent | Missing export declarations (diff) | |
download | ice-b61582b1c6b16be4339aa0bded3ad8f542a01df9.tar.bz2 ice-b61582b1c6b16be4339aa0bded3ad8f542a01df9.tar.xz ice-b61582b1c6b16be4339aa0bded3ad8f542a01df9.zip |
ICE-6471 Add support for IceSSL endpoint/connection info to Python/Ruby/PHP
Diffstat (limited to 'python/test')
-rw-r--r-- | python/test/Ice/info/AllTests.py | 9 | ||||
-rw-r--r-- | python/test/Ice/info/TestI.py | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/python/test/Ice/info/AllTests.py b/python/test/Ice/info/AllTests.py index 5dd6dbb5c69..35b21233b34 100644 --- a/python/test/Ice/info/AllTests.py +++ b/python/test/Ice/info/AllTests.py @@ -36,9 +36,9 @@ def allTests(communicator): (ipEndpoint.type() == Ice.WSEndpointType and not ipEndpoint.secure()) or # WS (ipEndpoint.type() == Ice.WSSEndpointType and ipEndpoint.secure())) # WS test((ipEndpoint.type() == Ice.TCPEndpointType and isinstance(ipEndpoint, Ice.TCPEndpointInfo)) or - (ipEndpoint.type() == Ice.SSLEndpointType) or + (ipEndpoint.type() == Ice.SSLEndpointType and isinstance(ipEndpoint, Ice.SSLEndpointInfo)) or (ipEndpoint.type() == Ice.WSEndpointType and isinstance(ipEndpoint, Ice.WSEndpointInfo)) or - (ipEndpoint.type() == Ice.WSSEndpointType)) + (ipEndpoint.type() == Ice.WSSEndpointType and isinstance(ipEndpoint, Ice.WSSEndpointInfo))) udpEndpoint = endps[1].getInfo() test(isinstance(udpEndpoint, Ice.UDPEndpointInfo)) @@ -153,8 +153,9 @@ def allTests(communicator): test(ctx["remotePort"] == str(info.localPort)) test(ctx["localPort"] == str(info.remotePort)) - if(base.ice_getConnection().type() == "ws"): - test(isinstance(info, Ice.WSConnectionInfo)) + if(base.ice_getConnection().type() == "ws" or base.ice_getConnection().type() == "wss"): + test((base.ice_getConnection().type() == "ws" and isinstance(info, Ice.WSConnectionInfo)) or + (base.ice_getConnection().type() == "wss" and isinstance(info, Ice.WSSConnectionInfo))) test(info.headers["Upgrade"] == "websocket") test(info.headers["Connection"] == "Upgrade") diff --git a/python/test/Ice/info/TestI.py b/python/test/Ice/info/TestI.py index c0b266a7ba4..863ac7ffdc9 100644 --- a/python/test/Ice/info/TestI.py +++ b/python/test/Ice/info/TestI.py @@ -62,7 +62,7 @@ class MyDerivedClassI(Test.TestIntf): ctx["remoteAddress"] = info.remoteAddress ctx["remotePort"] = str(info.remotePort) - if isinstance(info, Ice.WSConnectionInfo): + if isinstance(info, Ice.WSConnectionInfo) or isinstance(info, Ice.WSSConnectionInfo): for key, value in info.headers.items(): ctx["ws." + key] = value |