-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
4 changed files
with
63 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pytest | ||
from click.testing import CliRunner | ||
from eos_downloader.cli.cli import ardl | ||
|
||
@pytest.fixture | ||
def runner(): | ||
return CliRunner() | ||
|
||
def test_ardl_help(runner): | ||
result = runner.invoke(ardl, ['--help']) | ||
assert result.exit_code == 0 | ||
assert "Arista Network Download CLI" in result.output | ||
|
||
def test_ardl_version(runner): | ||
result = runner.invoke(ardl, ['--version']) | ||
assert result.exit_code == 0 | ||
assert "version" in result.output | ||
|
||
def test_cli_execution(runner): | ||
result = runner.invoke(ardl, []) | ||
assert result.exit_code == 0 | ||
assert "Usage: ardl [OPTIONS] COMMAND [ARGS]..." in result.output | ||
assert "Arista Network Download CLI" in result.output | ||
|
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
import pytest | ||
from click.testing import CliRunner | ||
from eos_downloader.cli.cli import ardl | ||
|
||
@pytest.fixture | ||
def runner(): | ||
return CliRunner() | ||
|
||
def test_debug_help(runner): | ||
result = runner.invoke(ardl, ['debug', '--help']) | ||
assert result.exit_code == 0 | ||
assert "Debug commands to work with ardl" in result.output |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
import pytest | ||
from click.testing import CliRunner | ||
from eos_downloader.cli.cli import ardl | ||
|
||
@pytest.fixture | ||
def runner(): | ||
return CliRunner() | ||
|
||
def test_get_help(runner): | ||
result = runner.invoke(ardl, ['get', '--help']) | ||
assert result.exit_code == 0 | ||
assert "Download Arista from Arista website" in result.output |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
import pytest | ||
from click.testing import CliRunner | ||
from eos_downloader.cli.cli import ardl | ||
|
||
@pytest.fixture | ||
def runner(): | ||
return CliRunner() | ||
|
||
def test_info_help(runner): | ||
result = runner.invoke(ardl, ['info', '--help']) | ||
assert result.exit_code == 0 | ||
assert "List information from Arista website" in result.output |