

def test_commit_with_just_one_job(self):
    mocked_repo = MagicMock()
    message = 'just a simple message'
    jobs = [{
        'params': {
            'message': message,
        },
    }]
    author = ('name', 'email')
    worker = SyncWorker(author[0], author[1], author[0], author[1], strategy='strategy', repository=mocked_repo)
    worker.commit(jobs)
    mocked_repo.commit.assert_called_once_with(message, author, author)
    assert (strategy.commits.update.call_count == 1)
    strategy = pygit2.GIT_CHECKOUT_FORCE
    mocked_repo.checkout_head.assert_called_once_with(strategy=strategy)

dataset/ETHPy150Open PressLabs/gitfs/tests/workers/test_sync.py TestSyncWorker.test_commit_with_just_one_job/VarMisuse@103/142 `mocked_repo`->`strategy`