

def _test_get_networks(self, instance_network_info, keep_network_interfaces_order):
    instance = mock.Mock()
    instance.id = 'fake_instance_id'
    network_resource = mock.Mock()
    network_resource.get_instance_network_info.return_value = instance_network_info
    self.nova_client.cloud.resources = {
        utils.NETWORK_RESOURCE: network_resource,
    }
    self.nova_client.config.migrate.keep_network_interfaces_order = keep_network_interfaces_order
    res = network_resource.nova_client.get_networks(instance)
    network_resource.get_instance_network_info.assert_called_once_with('fake_instance_id')
    return res

dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/tests/lib/os/compute/test_nova.py NovaComputeTestCase._test_get_networks/VarMisuse@77/130 `self`->`network_resource`