test we can pass an explicit websocket URL
This commit is contained in:
parent
ade99eb8b3
commit
dfd3bdd1a1
|
@ -50,3 +50,21 @@ class Service(unittest.TestCase):
|
|||
for s in services.services
|
||||
)
|
||||
)
|
||||
|
||||
def test_websocket_explicit_url(self):
|
||||
"""
|
||||
A websocket factory is created with --websocket and
|
||||
--websocket-url
|
||||
"""
|
||||
o = server_tap.Options()
|
||||
o.parseOptions([
|
||||
"--websocket=tcp:4004",
|
||||
"--websocket-url=ws://example.com:4004",
|
||||
])
|
||||
services = server_tap.makeService(o)
|
||||
self.assertTrue(
|
||||
any(
|
||||
isinstance(s.factory, WebSocketServerFactory)
|
||||
for s in services.services
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user