def test_edit_file_with_a_conflict(self):
        # commit remotely
        with open("page.rst", 'w') as p:
            p.write(self.content + '\nremote line')
        git.add('.')
        git.commit('-m', 'a remote log')

        # meanwhile. commit a change
        self.page.raw = self.page.raw + '\nlocal line'
        Git().commit(self.page)
        response = self.client.post(self.url, {})
        # local wins
        # Note: newer versions of git don't leave a blank line at the end
        self.assertRegexpMatches(self.content % "\nlocal line\n?$", self.page.raw)
dataset/ETHPy150Open mgaitan/waliki/tests/test_git_webhook.py/TestGitWebhook.test_edit_file_with_a_conflict/operator `+` -> `%`