def test_db_table_hack_with_mixin(self): class LeftMixin: pass class RightMixin: pass plugin_class = PluginModelBase('TestPlugin2', (LeftMixin, CMSPlugin, RightMixin), {'__module__': 'cms.tests.plugins'}) self.assertEqual(plugin_class._meta.db_table, 'cmsplugin_testplugin2')
def test_db_table_hack(self): # TODO: Django tests seem to leak models from test methods, somehow # we should clear django.db.models.loading.app_cache in tearDown. plugin_class = PluginModelBase('TestPlugin', (CMSPlugin,), {'__module__': 'cms.tests.plugins'}) self.assertEqual(plugin_class._meta.db_table, 'cmsplugin_testplugin')