From 06cba6ccd165ca8b224797e37fccb9e63f026d77 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 21 Mar 2020 11:28:17 +0100 Subject: Adding upstream version 1.9.1. Signed-off-by: Daniel Baumann --- tests/unittests/command_parse/test_pubsub.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/unittests/command_parse/test_pubsub.py (limited to 'tests/unittests/command_parse/test_pubsub.py') diff --git a/tests/unittests/command_parse/test_pubsub.py b/tests/unittests/command_parse/test_pubsub.py new file mode 100644 index 0000000..c7a2b54 --- /dev/null +++ b/tests/unittests/command_parse/test_pubsub.py @@ -0,0 +1,15 @@ +def test_publish(judge_command): + judge_command( + "publish foo bar", {"command": "publish", "channel": "foo", "message": "bar"} + ) + + +def test_subscribe(judge_command): + judge_command("subscribe foo bar", {"command": "subscribe", "channel": "bar"}) + + +def test_pubsub(judge_command): + judge_command( + "PUBSUB NUMSUB foo bar", + {"command": "PUBSUB", "pubsubcmd": "NUMSUB", "channel": "bar"}, + ) -- cgit v1.2.3