

@test.create_stubs({
    neutronclient: ('show_ikepolicy', 'list_ipsec_site_connections'),
})
def test_ikepolicy_get(self):
    ikepolicy = self.ikepolicies.first()
    ikepolicy_dict = {
        'ikepolicy': self.api_ikepolicies.first(),
    }
    ipsecsiteconnections_dict = {
        'ipsec_site_connections': self.api_ipsecsiteconnections.list(),
    }
    neutronclient.show_ikepolicy(ikepolicy.id).AndReturn(ikepolicy_dict)
    neutronclient.list_ipsec_site_connections().AndReturn(ipsecsiteconnections_dict)
    self.mox.ReplayAll()
    ret_val = api.vpn.ikepolicy_get(self.request, ikepolicy.id)
    self.assertIsInstance(ret_val, api.vpn.IKEPolicy)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/vpnaas_tests.py VPNaasApiTests.test_ikepolicy_get/original