'Test volume can\'t be cloned from an other volume in different az.'

@mock.patch('cinder.volume.api.API.list_availability_zones', return_value=({'name': 'nova', 'available': True}, {'name': 'az2', 'available': True}))
def test_create_volume_from_sourcevol_fail_wrong_az(self, _mock_laz):

    volume_api = cinder.volume.api.API()
    volume_src = tests_utils.create_volume(self.context, availability_zone='az2', **self.volume_params)
    self.volume.create_volume(self.context, volume_src)
    volume_src = db.volume_get(self.context, volume_src['id'])
    volume_dst = volume_api.create(self.context, size=1, name='fake_name', description='fake_desc', source_volume=volume_src)
    self.assertEqual('az2', volume_dst['availability_zone'])
    self.assertRaises(exception.InvalidInput, volume_api.create, self.context, size=1, name='fake_name', description='fake_desc', source_volume=volume_src, availability_zone='nova')
