'Ensure prep_resize raises a migration error if destination host is
not defined'

def test_prep_resize_instance_migration_error_on_none_host(self):

    instance = self._create_fake_instance_obj()
    self.compute.build_and_run_instance(self.context, instance, {}, {}, {}, block_device_mapping=[])
    instance.host = None
    instance.save()
    instance_type = flavors.get_default_flavor()
    self.assertRaises(exception.MigrationError, self.compute.prep_resize, self.context, instance=instance, instance_type=instance_type, image={}, reservations=[], request_spec={}, filter_properties={}, node=None, clean_shutdown=True)
    self.compute.terminate_instance(self.context, instance, [], [])
