From 170c9709eadd3066b36d7c1606725b7e1aaf9921 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Feb 20 2023 02:38:12 +0000 Subject: ... --- diff --git a/tests/test_lib/test_policy.py b/tests/test_lib/test_policy.py index 8bbbecb..d51b89f 100644 --- a/tests/test_lib/test_policy.py +++ b/tests/test_lib/test_policy.py @@ -403,6 +403,17 @@ all :: { with self.assertRaises(koji.GenericError): obj = koji.policy.SimpleRuleSet(policy.splitlines(), tests) + def test_stop_invalid(self): + tests = koji.policy.findSimpleTests(koji.policy.__dict__) + + policy = '''true :: stop 1''' + with self.assertRaises(koji.GenericError): + obj = koji.policy.SimpleRuleSet(policy.splitlines(), tests) + + policy = '''true :: stop that bus!''' + with self.assertRaises(koji.GenericError): + obj = koji.policy.SimpleRuleSet(policy.splitlines(), tests) + def test_complex_policy(self): tests = koji.policy.findSimpleTests(koji.policy.__dict__) data = {}