Skip to content

Commit

Permalink
Missing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hook25 committed Aug 19, 2024
1 parent 798c85b commit 899b45f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions checkbox-ng/plainbox/impl/secure/test_qualifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,20 @@ def test_get_vote(self):
IUnitQualifier.VOTE_IGNORE,
)

def test_matches_any_id(self):
template_job_mock = mock.Mock(template_id="some", id="other")

reg_match_template_id = RegExpJobQualifier("some", self.origin)
self.assertTrue(
reg_match_template_id.get_simple_match(template_job_mock)
)

reg_match_id = RegExpJobQualifier("other", self.origin)
self.assertTrue(reg_match_id.get_simple_match(template_job_mock))

reg_match_nothing = RegExpJobQualifier("nothing", self.origin)
self.assertFalse(reg_match_nothing.get_simple_match(template_job_mock))


class JobIdQualifierTests(TestCase):
"""
Expand Down

0 comments on commit 899b45f

Please sign in to comment.