websocket defaults test
This commit is contained in:
parent
d8da1a62d6
commit
bd06fad7e7
|
@ -70,9 +70,9 @@ def makeService(config, reactor=reactor):
|
||||||
print("Using WebSocket URL '{}'".format(ws_url))
|
print("Using WebSocket URL '{}'".format(ws_url))
|
||||||
ws_factory = WebSocketServerFactory(ws_url)
|
ws_factory = WebSocketServerFactory(ws_url)
|
||||||
ws_factory.protocol = transit_server.WebSocketTransitConnection
|
ws_factory.protocol = transit_server.WebSocketTransitConnection
|
||||||
|
ws_factory.transit = transit
|
||||||
|
|
||||||
tcp_factory.transit = transit
|
tcp_factory.transit = transit
|
||||||
ws_factory.transit = transit
|
|
||||||
parent = MultiService()
|
parent = MultiService()
|
||||||
StreamServerEndpointService(tcp_ep, tcp_factory).setServiceParent(parent)
|
StreamServerEndpointService(tcp_ep, tcp_factory).setServiceParent(parent)
|
||||||
if ws_ep is not None:
|
if ws_ep is not None:
|
||||||
|
|
|
@ -9,12 +9,14 @@ class Config(unittest.TestCase):
|
||||||
o = server_tap.Options()
|
o = server_tap.Options()
|
||||||
o.parseOptions([])
|
o.parseOptions([])
|
||||||
self.assertEqual(o, {"blur-usage": None, "log-fd": None,
|
self.assertEqual(o, {"blur-usage": None, "log-fd": None,
|
||||||
"usage-db": None, "port": PORT})
|
"usage-db": None, "port": PORT,
|
||||||
|
"websocket": None, "websocket-url": None})
|
||||||
def test_blur(self):
|
def test_blur(self):
|
||||||
o = server_tap.Options()
|
o = server_tap.Options()
|
||||||
o.parseOptions(["--blur-usage=60"])
|
o.parseOptions(["--blur-usage=60"])
|
||||||
self.assertEqual(o, {"blur-usage": 60, "log-fd": None,
|
self.assertEqual(o, {"blur-usage": 60, "log-fd": None,
|
||||||
"usage-db": None, "port": PORT})
|
"usage-db": None, "port": PORT,
|
||||||
|
"websocket": None, "websocket-url": None})
|
||||||
|
|
||||||
def test_string(self):
|
def test_string(self):
|
||||||
o = server_tap.Options()
|
o = server_tap.Options()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user