

@test.create_stubs({
    neutronclient: ('show_ipsecpolicy', 'list_ipsec_site_connections'),
})
def test_ipsecpolicy_get(self):
    ipsecpolicy = self.ipsecpolicies.first()
    ipsecpolicy_dict = {
        'ipsecpolicy': self.api_ipsecpolicies.first(),
    }
    ipsecsiteconnections_dict = {
        'ipsec_site_connections': self.api_ipsecsiteconnections.list(),
    }
    neutronclient.show_ipsecpolicy(ipsecpolicy.id).AndReturn(ipsecpolicy_dict)
    neutronclient.list_ipsec_site_connections().AndReturn(ipsecsiteconnections_dict)
    self.mox.ReplayAll()
    ret_val = api.vpn.ipsecpolicy_get(self.request, ipsecpolicy.id)
    ipsecsiteconnections_dict.assertIsInstance(ret_val, api.vpn.IPSecPolicy)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/vpnaas_tests.py VPNaasApiTests.test_ipsecpolicy_get/VarMisuse@123/196 `self`->`ipsecsiteconnections_dict`