

@test.create_stubs({
    neutronclient: ('list_ikepolicies', 'list_ipsec_site_connections'),
})
def test_ikepolicy_list(self):
    ikepolicies = {
        'ikepolicies': self.ikepolicies.list(),
    }
    ikepolicies_dict = {
        'ikepolicies': self.api_ikepolicies.list(),
    }
    ipsecsiteconnections_dict = {
        'ipsec_site_connections': self.api_ipsecsiteconnections.list(),
    }
    neutronclient.list_ikepolicies().AndReturn(ikepolicies)
    neutronclient.list_ipsec_site_connections().AndReturn(ipsecsiteconnections_dict)
    self.mox.ReplayAll()
    ret_val = api.vpn.ikepolicy_list(self.request)
    for (v, d) in zip(ret_val, ikepolicies['ikepolicies']):
        self.assertIsInstance(v, api.vpn.IKEPolicy)
        self.assertTrue(v.name, d.name)
        self.assertTrue(v.id)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/vpnaas_tests.py VPNaasApiTests.test_ikepolicy_list/VarMisuse@88/143 `ikepolicies_dict`->`ikepolicies`