def find(self, derivation, vulns): """Compiles all matching rules into a `Filtered` object.""" f = Filtered(derivation, vulns) for cand in self.candidates(derivation.pname, derivation.version): if cand.covers(derivation, vulns): f.add(cand) return f
def find(self, derivation): """Compiles all matching rules into a `Filtered` object.""" f = Filtered(derivation) for cand in self.candidates(derivation.pname, derivation.version): if cand.covers(derivation): f.add(cand) return f
def test_add_unspecific_rule(deriv): f = Filtered(deriv) f.add(WhitelistRule(pname='test', version='1.2')) assert not f.report