'Test that you can\'t add a text plugin'

def test_excluded_plugin(self):

    CMS_PLACEHOLDER_CONF = {'body': {'excluded_plugins': ['TextPlugin']}}
    with self.settings(CMS_PLACEHOLDER_CONF=CMS_PLACEHOLDER_CONF):
        page_data = self.get_new_page_data()
        self.client.post(URL_CMS_PAGE_ADD, page_data)
        page = Page.objects.all()[0]
        installed_plugins = plugin_pool.get_all_plugins('body', page)
        installed_plugins = [cls.__name__ for cls in installed_plugins]
        self.assertNotIn('TextPlugin', installed_plugins)
    CMS_PLACEHOLDER_CONF = {'body': {'plugins': ['TextPlugin'], 'excluded_plugins': ['TextPlugin']}}
    with self.settings(CMS_PLACEHOLDER_CONF=CMS_PLACEHOLDER_CONF):
        page_data = self.get_new_page_data()
        self.client.post(URL_CMS_PAGE_ADD, page_data)
        page = Page.objects.all()[0]
        installed_plugins = plugin_pool.get_all_plugins('body', page)
        installed_plugins = [cls.__name__ for cls in installed_plugins]
        self.assertNotIn('TextPlugin', installed_plugins)
