Created
September 18, 2011 16:23
-
-
Save kezabelle/1225233 to your computer and use it in GitHub Desktop.
test piece for django-cms issue #992
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tests/project/pluginapp/plugins/db_table/cms_plugins.py | |
from django.db import models | |
from cms.models import CMSPlugin | |
class NewPluginTestNoDefaults(CMSPlugin): | |
pass | |
class NewPluginTestAsPerDefaults(CMSPlugin): | |
class Meta: | |
# todo - use defaults | |
class NewPluginTestCustomisedAppLabel(CMSPlugin): | |
class Meta: | |
app_label = 'one_thing' | |
class NewPluginTestCustomisedDBTable(CMSPlugin): | |
class Meta: | |
db_table = 'or_another' | |
class NewPluginTestCustomisedBoth(CMSPlugin): | |
class Meta: | |
app_label = 'one_thing' | |
db_table = 'or_another' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add the app to installed apps on runtime in your test method (using SettingsOverride) and then import models.py in the test.