summaryrefslogtreecommitdiffstats
path: root/tests/unittests/command_parse/test_pubsub.py
blob: c7a2b547e37645657a3272db2e1c0e104ca478c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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"},
    )