def test_in_any_group(self): """Test the predicate for requiring at least one group.""" assert self.met(in_any_group('guest', 'edit', 'user')) assert not self.met(in_all_groups('guest', 'user'))
def test_in_all_groups(self): """Test the predicate for requiring a number of group.""" assert self.met(in_all_groups('admin', 'edit')) assert not self.met(in_all_groups('admin', 'guest', 'edit'))