diff options
Diffstat (limited to 'packages/meshbay-cli/tests/test_cli_actions.py')
| -rw-r--r-- | packages/meshbay-cli/tests/test_cli_actions.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/meshbay-cli/tests/test_cli_actions.py b/packages/meshbay-cli/tests/test_cli_actions.py index 5443d9b..240ac67 100644 --- a/packages/meshbay-cli/tests/test_cli_actions.py +++ b/packages/meshbay-cli/tests/test_cli_actions.py @@ -203,6 +203,19 @@ def test_a_usage_error_is_exit_1_not_the_sign_in_code(capsys): +def test_help_prints_what_help_prints(capsys): + assert cli.main(["--help"]) == 0 + whole = capsys.readouterr().out + assert main("help") == 0 + assert capsys.readouterr().out == whole + assert cli.main(["chat", "--help"]) == 0 + chat = capsys.readouterr().out + assert main("help", "chat") == 0 + assert capsys.readouterr().out == chat + assert main("help", "no-such-action") == 1 + assert "No action 'no-such-action'" in capsys.readouterr().err + + def test_groups_lists_each_group_with_its_state(hub, capsys): hub.groups.append({"id": "g2", "name": "Club/Photos", "owner_username": "bob-test", "node_online": False, "visibility": "public", "is_admin": False, |