diff --git a/src/wormhole_transit_relay/test/test_service.py b/src/wormhole_transit_relay/test/test_service.py index 23faed8..9ab30c8 100644 --- a/src/wormhole_transit_relay/test/test_service.py +++ b/src/wormhole_transit_relay/test/test_service.py @@ -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 + ) + )