def test_get_port_ips(self):
    self.patch_object(api_crud, 'session_from_identity_service')
    self.patch_object(api_crud, 'init_neutron_client')
    nc = mock.MagicMock()
    self.init_neutron_client.return_value = nc
    nc.list_ports.return_value = {'ports': [{'fixed_ips': [{'ip_address': '2001:db8:42::42'}]}, {'fixed_ips': [{'ip_address': '2001:db8:42::51'}]}]}
    identity_service = mock.MagicMock()
    self.assertEquals(api_crud.get_port_ips(identity_service), ['2001:db8:42::42', '2001:db8:42::51'])
    self.init_neutron_client.assert_called_once_with(self.session_from_identity_service())
def test_get_port_ips(self):
    self.patch_object(api_crud, 'session_from_identity_service')
    self.patch_object(api_crud, 'init_neutron_client')
    nc = mock.MagicMock()
    self.init_neutron_client.return_value = nc
    nc.list_ports.return_value = {'ports': [{'fixed_ips': [{'ip_address': '2001:db8:42::42'}]}, {'fixed_ips': [{'ip_address': '2001:db8:42::51'}]}]}
    identity_service = mock.MagicMock()
    self.assertEquals(api_crud.get_port_ips(identity_service), ['2001:db8:42::42', '2001:db8:42::51'])
    self.init_neutron_client.assert_called_once_with(self.session_from_identity_service())