

@test.create_stubs({
    neutronclient: ('show_ipsec_site_connection', 'show_ikepolicy', 'show_ipsecpolicy', 'show_vpnservice'),
})
def test_ipsecsiteconnection_get(self):
    ipsecsiteconnection = self.ipsecsiteconnections.first()
    connection_dict = {
        'ipsec_site_connection': self.api_ipsecsiteconnections.first(),
    }
    ikepolicy_dict = {
        'ikepolicy': self.api_ikepolicies.first(),
    }
    ipsecpolicy_dict = {
        'ipsecpolicy': self.api_ipsecpolicies.first(),
    }
    vpnservice_dict = {
        'vpnservice': self.api_vpnservices.first(),
    }
    neutronclient.show_ipsec_site_connection(ipsecsiteconnection.id).AndReturn(connection_dict)
    neutronclient.show_ikepolicy(ipsecsiteconnection.ikepolicy_id).AndReturn(ikepolicy_dict)
    neutronclient.show_ipsecpolicy(ipsecsiteconnection.ipsecpolicy_id).AndReturn(ipsecpolicy_dict)
    neutronclient.show_vpnservice(ipsecsiteconnection.vpnservice_id).AndReturn(vpnservice_dict)
    self.mox.ReplayAll()
    ret_val = api.vpn.ipsecsiteconnection_get(ipsecpolicy_dict.request, ipsecsiteconnection.id)
    self.assertIsInstance(ret_val, api.vpn.IPSecSiteConnection)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/vpnaas_tests.py VPNaasApiTests.test_ipsecsiteconnection_get/VarMisuse@183/312 `self`->`ipsecpolicy_dict`