-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48c87be
commit 22f977d
Showing
1 changed file
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
import pytest | ||
|
||
import textwrap | ||
from tests.integration.helpers import exec_test_command | ||
|
||
|
||
@pytest.mark.smoke | ||
def test_help_page_for_non_aliased_actions(): | ||
process = exec_test_command(["linode-cli", "linodes", "list", "--help"]) | ||
output = process.stdout.decode() | ||
wrapped_output = textwrap.fill(output, width=150).replace("\n", "") | ||
|
||
assert "Linodes List" in output | ||
assert "Linodes List" in wrapped_output | ||
assert ( | ||
"API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes" | ||
in output | ||
"API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes-list" | ||
in wrapped_output | ||
) | ||
assert "You may filter results with:" in output | ||
assert "--tags" in output | ||
assert "You may filter results with:" in wrapped_output | ||
assert "--tags" in wrapped_output | ||
|
||
|
||
@pytest.mark.smoke | ||
def test_help_page_for_aliased_actions(): | ||
process = exec_test_command(["linode-cli", "linodes", "ls", "--help"]) | ||
output = process.stdout.decode() | ||
wrapped_output = textwrap.fill(output, width=150).replace("\n", "") | ||
|
||
assert "Linodes List" in output | ||
assert "Linodes List" in wrapped_output | ||
assert ( | ||
"API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes" | ||
in output | ||
"API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes-list" | ||
in wrapped_output | ||
) | ||
assert "You may filter results with:" in output | ||
assert "--tags" in output | ||
assert "You may filter results with:" in wrapped_output | ||
assert "--tags" in wrapped_output |