'Tests side effect of language fallback: if fallback enabled placeholder
existed, it discards all other existing plugins'

def test_plugins_discarded_with_language_fallback(self):

    page_en = create_page('page_en', 'col_two.html', 'en')
    create_title('de', 'page_de', page_en)
    placeholder_sidebar_en = page_en.placeholders.get(slot='col_sidebar')
    placeholder_en = page_en.placeholders.get(slot='col_left')
    add_plugin(placeholder_sidebar_en, 'TextPlugin', 'en', body='en    body')
    context_en = SekizaiContext()
    context_en['request'] = self.get_request(language='en', page=page_en)
    conf = {'col_left': {'language_fallback': True}}
    with self.settings(CMS_PLACEHOLDER_CONF=conf):
        assign_plugins(context_en['request'], [placeholder_sidebar_en, placeholder_en], 'col_two.html')
        content_en = _render_placeholder(placeholder_sidebar_en, context_en)
        self.assertRegexpMatches(content_en, '^en    body$')
        del placeholder_sidebar_en._plugins_cache
        cache.clear()
