aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2022-11-19 21:48:27 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commit1358241a612980781bc7f80dec67bc8de74a3903 (patch)
tree3aa8b4be8cb7428d997881b54c3f630aa9445b8d /tests/test_commands.py
parent0c599d0cd601bd491f4270a8ababab0ffe70b327 (diff)
downloadwee-slack-1358241a612980781bc7f80dec67bc8de74a3903.tar.gz
Add command to add workspace
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
new file mode 100644
index 0000000..c9dbcaa
--- /dev/null
+++ b/tests/test_commands.py
@@ -0,0 +1,13 @@
+# Test parsing options
+# Test calling the correct function
+
+from itertools import accumulate
+
+import slack.commands
+
+
+def test_all_parent_commands_exist():
+ for command in slack.commands.commands:
+ parents = accumulate(command.split(" "), lambda x, y: f"{x} {y}")
+ for parent in parents:
+ assert parent in slack.commands.commands