

def test_create_page_if_remote_added_files(self):
    assert (not Page.objects.filter(path='newpage.rst').exists())
    with open('newpage.rst', 'w') as p:
        p.write('the new content')
    git.add('.')
    git.commit('-m', 'add new page')
    response = self.client.post(self.url, {
        
    })
    new_page = Page.objects.get(path='newpage.rst')
    self.assertEqual(new_page.raw, 'the new content')

dataset/ETHPy150Open mgaitan/waliki/tests/test_git_webhook.py TestGitWebhook.test_create_page_if_remote_added_files/original