'Make sure that the worker is created when creating a volume.'

@mock.patch('cinder.scheduler.driver.Scheduler.schedule_create_volume')
@mock.patch('eventlet.sleep')
def test_create_volume_set_worker(self, _mock_sleep, _mock_sched_create):

    volume = tests_utils.create_volume(self.context, status='creating')
    request_spec = {'volume_id': volume.id}
    self.manager.create_volume(self.context, volume, request_spec=request_spec, filter_properties={})
    volume.set_worker.assert_called_once_with()
