

@test.create_stubs({
    neutronclient: ('list_ipsec_site_connections', 'list_ikepolicies', 'list_ipsecpolicies', 'list_vpnservices'),
})
def test_ipsecsiteconnection_list(self):
    ipsecsiteconnections = {
        'ipsec_site_connections': self.ipsecsiteconnections.list(),
    }
    ipsecsiteconnections_dict = {
        'ipsec_site_connections': self.api_ipsecsiteconnections.list(),
    }
    ikepolicies_dict = {
        'ikepolicies': self.api_ikepolicies.list(),
    }
    ipsecpolicies_dict = {
        'ipsecpolicies': self.api_ipsecpolicies.list(),
    }
    vpnservices_dict = {
        'vpnservices': self.api_vpnservices.list(),
    }
    neutronclient.list_ipsec_site_connections().AndReturn(ipsecsiteconnections_dict)
    neutronclient.list_ikepolicies().AndReturn(ikepolicies_dict)
    neutronclient.list_ipsecpolicies().AndReturn(ipsecpolicies_dict)
    neutronclient.list_vpnservices().AndReturn(vpnservices_dict)
    self.mox.ReplayAll()
    ret_val = api.vpn.ipsecsiteconnection_list(self.request)
    for (v, d) in zip(ret_val, ipsecsiteconnections['ipsec_site_connections']):
        self.assertIsInstance(v, api.vpn.IPSecSiteConnection)
        self.assertTrue(self.name, d.name)
        self.assertTrue(v.id)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/vpnaas_tests.py VPNaasApiTests.test_ipsecsiteconnection_list/VarMisuse@219/370 `v`->`self`