def test_plugin_parent_classes(self):
        ParentClassesPlugin = type('ParentClassesPlugin', (CMSPluginBase,),
                                   dict(parent_classes=['GenericParentPlugin'], render_plugin=False))
        GenericParentPlugin = type('GenericParentPlugin', (CMSPluginBase,), {'render_plugin':False})
        KidnapperPlugin = type('KidnapperPlugin', (CMSPluginBase,), {'render_plugin':False})

        with register_plugins(ParentClassesPlugin, GenericParentPlugin, KidnapperPlugin):
            page = api.create_page("page", "nav_playground.html", "en", published=True)
            placeholder = page.placeholders.get(slot='body')

            from cms.utils.placeholder import get_toolbar_plugin_struct
            toolbar_struct = get_toolbar_plugin_struct([ParentClassesPlugin],
                                                        placeholder.slot,
                                                        page,
                                                        parent=GenericParentPlugin)
            expected_struct = {'module': u'Generic',
                           'name': u'Parent Classes Plugin',
                           'value': 'ParentClassesPlugin'}

            self.assertTrue(expected_struct in toolbar_struct)

            toolbar_struct = get_toolbar_plugin_struct([ParentClassesPlugin],
                                                        placeholder.slot,
                                                        page,
                                                        parent=KidnapperPlugin)
            self.assertFalse(expected_struct in toolbar_struct)

            toolbar_struct = get_toolbar_plugin_struct([ParentClassesPlugin, GenericParentPlugin],
                                                        placeholder.slot,
                                                        page)
            expected_struct = {'module': u'Generic',
                                'name': u'Generic Parent Plugin',
                                'value': 'GenericParentPlugin'}
            self.assertTrue(expected_struct in toolbar_struct)
Return a tuple of (column_name, type) for a given AttributeRef.
dataset/ETHPy150Open divio/django-cms/cms/tests/test_plugins.py/PluginsTestCase.test_plugin_parent_classes--crossover with--dataset/ETHPy150Open uwescience/raco/raco/algebra.py/Operator.resolveAttribute