'Test repeat function with a list and a map.'

def test_repeat_list_and_map(self):

    snippet = {'repeat': {'template': 'this    is    %var1%-%var2%', 'for_each': {'%var1%': ['a', 'b', 'c'], '%var2%': {'x': 'v', 'y': 'v'}}}}
    snippet_resolved = ['this    is    a-x', 'this    is    b-x', 'this    is    c-x', 'this    is    a-y', 'this    is    b-y', 'this    is    c-y']
    tmpl = template.Template(hot_newton_tpl_empty)
    result = self.resolve(snippet, tmpl)
    self.assertEqual(len(result), len(snippet_resolved))
    for item in result:
        self.assertIn(item, snippet_resolved)
