'Tests that the PageWizard respects the
CMS_PAGE_WIZARD_CONTENT_PLACEHOLDER setting.'

def test_wizard_content_placeholder_setting(self):

    templates = get_cms_setting('TEMPLATES')
    templates.append(('page_wizard.html', 'page_wizard.html'))
    settings = {'CMS_TEMPLATES': templates, 'CMS_PAGE_WIZARD_DEFAULT_TEMPLATE': 'page_wizard.html', 'CMS_PAGE_WIZARD_CONTENT_PLACEHOLDER': 'sub-content'}
    with override_settings(**settings):
        superuser = self.get_superuser()
        page = create_page('wizard    home', 'page_wizard.html', 'en')
        publish_page(page, superuser, 'en')
        content = '<p>sub-content    content.</p>'
        data = {'title': 'page    1', 'slug': 'page_1', 'page_type': None, 'content': content}
        form = CreateCMSPageForm(data=data)
        form.page = page
        form.language_code = 'en'
        form.user = superuser
        self.assertTrue(form.is_valid())
        page = form.save()
        page.publish('en')
        with self.login_user_context(superuser):
            url = page.get_absolute_url('en')
            expected = '<div    class="sub-content">{0}</div>'.format(content)
            unexpected = '<div    class="content">{0}</div>'.format(content)
            response = self.client.get(url)
            self.assertContains(response, expected, status_code=200)
            self.assertNotContains(response, unexpected, status_code=200)
