def test_commit_with_more_than_one_job(self):
        mocked_repo = MagicMock()

        message = 'just a simple message'
        jobs = [{'params': {'message': message, 'add': ['path1', 'path2'],
                            'remove': []}},
                {'params': {'message': message, 'remove': ['path2'],
                            'add': []}}]
        author = ("name", "email")

        worker = SyncWorker(author[0], author[1], author[0], author[1],
                            strategy="strategy",
                            repository=mocked_repo)
        worker.commit(jobs)

        asserted_message = "Update 2 items"
        mocked_repo.commit.assert_called_once_with(asserted_message, author,
                                                   author)
        assert mocked_repo.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_more_than_one_job/original