Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_checks_directly(ruleset):
checks = colin.get_checks(ruleset=ruleset)
assert checks
def test_unknown_check(ruleset_unknown_check):
with pytest.raises(ColinRulesetException) as ex:
colin.get_checks(ruleset=ruleset_unknown_check)
assert str(ex.value) == "Check i_forgot_the_name can't be loaded, we couldn't find it."
def test_coupled_ruleset(ruleset_coupled):
checks = colin.get_checks(ruleset=ruleset_coupled)
assert checks
assert len(checks) == 3
for c in checks:
assert "required" in c.tags
def test_skip(ruleset):
checks = colin.get_checks(ruleset=ruleset, skips=["name_label", "help_label"])
assert len(checks) == 2
for check in checks:
assert check.name in ["com.redhat.component_label", "maintainer_label"]