'Tests the behavior when a wrong attribute name is passed in a rule.'

def testInvalidRules(self):

    client_rule_set = rdf_foreman.ForemanClientRuleSet(rules=[rdf_foreman.ForemanClientRule(rule_type=rdf_foreman.ForemanClientRule.Type.REGEX, regex=rdf_foreman.ForemanRegexClientRule(attribute_name='no    such    attribute', attribute_regex='HUNT'))])
    with implementation.GRRHunt.StartHunt(hunt_name=BrokenSampleHunt.__name__, client_rule_set=client_rule_set, client_rate=0, token=self.token) as hunt:
        runner = hunt.GetRunner()
        self.assertRaises(ValueError, runner.Start)
