summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2015-02-06 00:40:36 +0100
committerMarkus Holtermann <info@markusholtermann.eu>2015-02-06 00:50:42 +0100
commitc9addfd4bfadde043a1aec7854b285aa212bdd5a (patch)
treef194898f3ffe88c372ceb0b6c1483d12ebc60503
parente3702dc3f2af9e8cc6c1155b248f458899be334e (diff)
[1.8.x] Fixed small regression caused by e3702dc3f2af9e8cc6c1155b248f458899be334e
Since 1.7 models need to declare an explicit app_label if they are not in an application in INSTALLED_APPS or were imported before their application was loaded. Backport of 235124d3eaf6cc7ab9f97f1d1467d1caf18e1016 from master
-rw-r--r--tests/schema/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index 17040c1a69..f6df3e7633 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -218,6 +218,7 @@ class SchemaTests(TransactionTestCase):
name = CharField(max_length=255)
class Meta:
+ app_label = 'schema'
apps = new_apps
self.local_models = [LocalAuthorWithM2M]
@@ -652,6 +653,7 @@ class SchemaTests(TransactionTestCase):
tags = M2MFieldClass("TagM2MTest", related_name="books")
class Meta:
+ app_label = 'schema'
apps = new_apps
self.local_models = [LocalBookWithM2M]
@@ -683,12 +685,14 @@ class SchemaTests(TransactionTestCase):
tag = ForeignKey("schema.TagM2MTest")
class Meta:
+ app_label = 'schema'
apps = new_apps
class LocalBookWithM2MThrough(Model):
tags = M2MFieldClass("TagM2MTest", related_name="books", through=LocalTagThrough)
class Meta:
+ app_label = 'schema'
apps = new_apps
self.local_models = [LocalTagThrough, LocalBookWithM2MThrough]
@@ -720,6 +724,7 @@ class SchemaTests(TransactionTestCase):
name = CharField(max_length=255)
class Meta:
+ app_label = 'schema'
apps = new_apps
self.local_models = [LocalAuthorWithM2M]
@@ -768,6 +773,7 @@ class SchemaTests(TransactionTestCase):
tag = ForeignKey("schema.TagM2MTest")
class Meta:
+ app_label = 'schema'
apps = new_apps
class LocalAuthorWithM2MThrough(Model):
@@ -775,6 +781,7 @@ class SchemaTests(TransactionTestCase):
tags = M2MFieldClass("schema.TagM2MTest", related_name="authors", through=LocalAuthorTag)
class Meta:
+ app_label = 'schema'
apps = new_apps
self.local_models = [LocalAuthorTag, LocalAuthorWithM2MThrough]
@@ -815,6 +822,7 @@ class SchemaTests(TransactionTestCase):
tags = M2MFieldClass("TagM2MTest", related_name="books")
class Meta:
+ app_label = 'schema'
apps = new_apps
self.local_models = [LocalBookWithM2M]