'Tests invalid key raises exception'

def test_getter_key_error(self):

    root = netapp_api.NaElement('root')
    self.mock_object(root, 'get_child_by_name', return_value=None)
    self.mock_object(root, 'has_attr', return_value=None)
    self.assertRaises(KeyError, netapp_api.NaElement.__getitem__, root, '123')
