'Validate a default textplugin with a nested default link plugin'

def test_plugins_children_prepopulate(self):

    conf = {'col_left': {'default_plugins': [{'plugin_type': 'TextPlugin', 'values': {'body': '<p>body    %(_tag_child_1)s    and    %(_tag_child_2)s</p>'}, 'children': [{'plugin_type': 'LinkPlugin', 'values': {'name': 'django', 'external_link': 'https://www.djangoproject.com/'}}, {'plugin_type': 'LinkPlugin', 'values': {'name': 'django-cms', 'external_link': 'https://www.django-cms.org'}}]}]}}
    with self.settings(CMS_PLACEHOLDER_CONF=conf):
        page = create_page('page_en', 'col_two.html', 'en')
        placeholder = page.placeholders.get(slot='col_left')
        context = SekizaiContext()
        context['request'] = self.get_request(language='en', page=page)
        _render_placeholder(placeholder, context)
        plugins = placeholder.get_plugins_list()
        self.assertEqual(len(plugins), 3)
        self.assertEqual(plugins[0].plugin_type, 'TextPlugin')
        self.assertEqual(plugins[1].plugin_type, 'LinkPlugin')
        self.assertEqual(plugins[2].plugin_type, 'LinkPlugin')
        self.assertTrue(((plugins[1].parent == plugins[2].parent) and (plugins[1].parent == plugins[0])))
