'Tests reporting error by repeat function.
Test that the repeat function reports a proper error when missing or
invalid arguments.'

def test_repeat_bad_args(self):

    tmpl = template.Template(hot_kilo_tpl_empty)
    snippet = {'repeat': {'template': 'this    is    %var%'}}
    self.assertRaises(exception.StackValidationFailed, self.resolve, snippet, tmpl)
    snippet = {'repeat': {'template': 'this    is    %var%', 'foreach': {'%var%': ['a', 'b', 'c']}}}
    self.assertRaises(exception.StackValidationFailed, self.resolve, snippet, tmpl)
    snippet = {'repeat': {'templte': 'this    is    %var%', 'for_each': {'%var%': ['a', 'b', 'c']}}}
    self.assertRaises(exception.StackValidationFailed, self.resolve, snippet, tmpl)
