'Tests if list/dict gets properly converted to NaElements.'

def test_translate_struct_dict_nonunique_key(self):

    root = netapp_api.NaElement('root')
    child = [{'e1': 'v1', 'e2': 'v2'}, {'e1': 'v3'}]
    root.translate_struct(child)
    self.assertEqual(3, len(root.get_children()))
    children = root.get_children()
    for c in children:
        if (c.get_name() == 'e1'):
            self.assertIn(c.get_content(), ['v1', 'v3'])
        else:
            self.assertEqual('v2', c.get_content())
