'Test that a page can be edited multiple times with moderator'

def test_moderator_edit_page_redirect(self):

    create_page('home', 'nav_playground.html', 'en', published=True)
    superuser = self.get_superuser()
    with self.login_user_context(superuser):
        page_data = self.get_new_page_data()
        response = self.client.post(URL_CMS_PAGE_ADD, page_data)
        self.assertEqual(response.status_code, 302)
        page = Page.objects.get(title_set__slug=page_data['slug'])
        response = self.client.get((URL_CMS_PAGE_CHANGE % page.id))
        self.assertEqual(response.status_code, 200)
        page_data['overwrite_url'] = '/hello/'
        page_data['has_url_overwrite'] = True
        response = self.client.post((URL_CMS_PAGE_ADVANCED_CHANGE % page.id), page_data)
        self.assertRedirects(response, URL_CMS_PAGE)
        self.assertEqual(page.get_absolute_url(), '/en/hello/')
        Title.objects.all()[0]
        page = page.reload()
        page.publish('en')
        page_data['title'] = 'new    title'
        response = self.client.post((URL_CMS_PAGE_CHANGE % page.id), page_data)
        page = Page.objects.get(title_set__slug=page_data['slug'], publisher_is_draft=True)
        self.assertRedirects(response, URL_CMS_PAGE)
        self.assertEqual(page.get_title(), 'new    title')
