'Test create from source and snap with type mismatch one backend.'

@mock.patch('cinder.volume.flows.api.create_volume.get_flow')
def test_create_from_source_and_snap_only_one_backend(self, _get_flow):

    volume_api = cinder.volume.api.API()
    foo_type = fake_volume.fake_volume_type_obj(self.context, id=fake.VOLUME_TYPE_ID, name='foo', qos_specs_id=None, deleted=False, created_at=datetime.datetime(2015, 5, 8, 0, 40, 5, 408232), updated_at=None, extra_specs={'some_key': 3}, is_public=True, deleted_at=None, description=None)
    biz_type = fake_volume.fake_volume_type_obj(self.context, id=fake.VOLUME_TYPE2_ID, name='biz', qos_specs_id=None, deleted=False, created_at=datetime.datetime(2015, 5, 8, 0, 20, 5, 408232), updated_at=None, extra_specs={'some_other_key': 4}, is_public=True, deleted_at=None, description=None)
    source_vol = fake_volume.fake_volume_obj(self.context, id=fake.VOLUME_ID, status='available', volume_size=10, volume_type_id=biz_type.id)
    source_vol.volume_type = biz_type
    snapshot = {'id': fake.SNAPSHOT_ID, 'status': fields.SnapshotStatus.AVAILABLE, 'volume_size': 10, 'volume_type_id': biz_type['id']}
    snapshot_obj = fake_snapshot.fake_snapshot_obj(self.context, **snapshot)
    snapshot_obj.volume = source_vol
    with mock.patch('cinder.db.service_get_all') as mock_get_service:
        with mock.patch.object(volume_api, 'list_availability_zones') as mock_get_azs:
            mock_get_service.return_value = [{'host': 'foo'}]
            mock_get_azs.return_value = {}
            volume_api.create(self.context, size=1, name='fake_name', description='fake_desc', volume_type=foo_type, source_volume=source_vol)
            volume_api.create(self.context, size=1, name='fake_name', description='fake_desc', volume_type=foo_type, snapshot=snapshot_obj)
