From b3b6e1ba8a1c94ffad008fa223a578df28296f02 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 15 Jul 2017 17:39:02 -0700 Subject: [PATCH] test_cli: one more test, with argument split off from the name This is probably an easier way to pass in JSON with embedded spaces: wormhole-server start --websocket-protocol-option 'x=["foo": "bar"]' --- src/wormhole/test/test_cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wormhole/test/test_cli.py b/src/wormhole/test/test_cli.py index 8e9d5bb..8c3a0fa 100644 --- a/src/wormhole/test/test_cli.py +++ b/src/wormhole/test/test_cli.py @@ -1248,12 +1248,15 @@ class Server(unittest.TestCase): '--websocket-protocol-option=b=true', '--websocket-protocol-option=c=3.5', '--websocket-protocol-option=d=["foo","bar"]', + '--websocket-protocol-option', 'e=["foof","barf"]', ]) self.assertEqual(0, result.exit_code) cfg = fake_start_server.mock_calls[0][1][0] self.assertEqual( cfg.websocket_protocol_option, - [("a", 3), ("b", True), ("c", 3.5), ("d", ['foo', 'bar'])], + [("a", 3), ("b", True), ("c", 3.5), ("d", ['foo', 'bar']), + ("e", ['foof', 'barf']), + ], ) def test_broken_websocket_protocol_options(self):