'Test worker creation as if it were from an rpc call.'

@mock.patch('cinder.db.worker_create', autospec=True)
def test_create_worker(self, mock_create):

    rpc.LAST_OBJ_VERSIONS[Backup.get_rpc_api().BINARY] = '1.3'
    mock_create.return_value = mock.sentinel.worker
    backup = Backup(_context=self.context, status='cleanable', id=mock.sentinel.id)
    res = backup.create_worker()
    self.assertTrue(res)
    mock_create.assert_called_once_with(self.context, status='cleanable', resource_type='Backup', resource_id=mock.sentinel.id)
