Skip to content

Commit

Permalink
test platform with invalid argument
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtapolasek committed Dec 20, 2022
1 parent 6827b63 commit a6492cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/ssg-module/test_build_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ def test_parametrized_platform(product_cpes):
assert cpe_item.title == "Package ntp is installed"
assert cpe_item.check_id == "installed_env_has_ntp_package"

def test_parametrized_platform_with_invalid_argument(product_cpes):
with pytest.raises(KeyError):
platform = ssg.build_yaml.Platform.from_text("package[nonexisting_argument]", product_cpes)


def test_derive_id_from_file_name():
assert ssg.entities.common.derive_id_from_file_name("rule.yml") == "rule"
Expand Down

0 comments on commit a6492cf

Please sign in to comment.