diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 05:06:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 05:06:46 +0000 |
commit | 92240acb5cc600eec60624ece9ed4b9ec43b386f (patch) | |
tree | 13328d0de4f37030731a96e25749563742fce0cb /tests/units/cli/nrfu/test_commands.py | |
parent | Adding upstream version 0.14.0. (diff) | |
download | anta-92240acb5cc600eec60624ece9ed4b9ec43b386f.tar.xz anta-92240acb5cc600eec60624ece9ed4b9ec43b386f.zip |
Adding upstream version 0.15.0.upstream/0.15.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/units/cli/nrfu/test_commands.py')
-rw-r--r-- | tests/units/cli/nrfu/test_commands.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/units/cli/nrfu/test_commands.py b/tests/units/cli/nrfu/test_commands.py index 4ea40b7..e2b5031 100644 --- a/tests/units/cli/nrfu/test_commands.py +++ b/tests/units/cli/nrfu/test_commands.py @@ -54,6 +54,20 @@ def test_anta_nrfu_table(click_runner: CliRunner) -> None: assert "dummy │ VerifyEOSVersion │ success" in result.output +def test_anta_nrfu_table_group_by_device(click_runner: CliRunner) -> None: + """Test anta nrfu, catalog is given via env.""" + result = click_runner.invoke(anta, ["nrfu", "table", "--group-by", "device"]) + assert result.exit_code == ExitCode.OK + assert "Summary per device" in result.output + + +def test_anta_nrfu_table_group_by_test(click_runner: CliRunner) -> None: + """Test anta nrfu, catalog is given via env.""" + result = click_runner.invoke(anta, ["nrfu", "table", "--group-by", "test"]) + assert result.exit_code == ExitCode.OK + assert "Summary per test" in result.output + + def test_anta_nrfu_text(click_runner: CliRunner) -> None: """Test anta nrfu, catalog is given via env.""" result = click_runner.invoke(anta, ["nrfu", "text"]) @@ -66,7 +80,7 @@ def test_anta_nrfu_json(click_runner: CliRunner) -> None: result = click_runner.invoke(anta, ["nrfu", "json"]) assert result.exit_code == ExitCode.OK assert "JSON results" in result.output - match = re.search(r"\[\n {[\s\S]+ }\n\]", result.output) + match = re.search(r"\[\n {2}{[\s\S]+ {2}}\n\]", result.output) assert match is not None result_list = json.loads(match.group()) for res in result_list: |