From 425f040168187d4a2c8068aa3efdabc9d10a74a8 Mon Sep 17 00:00:00 2001 From: meejah Date: Wed, 14 Apr 2021 17:01:20 -0600 Subject: [PATCH] test for websocket option-parsing --- src/wormhole_transit_relay/test/test_config.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wormhole_transit_relay/test/test_config.py b/src/wormhole_transit_relay/test/test_config.py index 0b014d2..e942d30 100644 --- a/src/wormhole_transit_relay/test/test_config.py +++ b/src/wormhole_transit_relay/test/test_config.py @@ -18,6 +18,13 @@ class Config(unittest.TestCase): "usage-db": None, "port": PORT, "websocket": None, "websocket-url": None}) + def test_websocket(self): + o = server_tap.Options() + o.parseOptions(["--websocket=tcp:4004"]) + self.assertEqual(o, {"blur-usage": None, "log-fd": None, + "usage-db": None, "port": PORT, + "websocket": "tcp:4004", "websocket-url": None}) + def test_string(self): o = server_tap.Options() s = str(o)