Fixed small regression caused by 0204714b0b
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.
This commit is contained in:
parent
1f9e44030e
commit
235124d3ea
|
@ -218,6 +218,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
name = CharField(max_length=255)
|
name = CharField(max_length=255)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
self.local_models = [LocalAuthorWithM2M]
|
self.local_models = [LocalAuthorWithM2M]
|
||||||
|
@ -652,6 +653,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
tags = M2MFieldClass("TagM2MTest", related_name="books")
|
tags = M2MFieldClass("TagM2MTest", related_name="books")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
self.local_models = [LocalBookWithM2M]
|
self.local_models = [LocalBookWithM2M]
|
||||||
|
@ -683,12 +685,14 @@ class SchemaTests(TransactionTestCase):
|
||||||
tag = ForeignKey("schema.TagM2MTest")
|
tag = ForeignKey("schema.TagM2MTest")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
class LocalBookWithM2MThrough(Model):
|
class LocalBookWithM2MThrough(Model):
|
||||||
tags = M2MFieldClass("TagM2MTest", related_name="books", through=LocalTagThrough)
|
tags = M2MFieldClass("TagM2MTest", related_name="books", through=LocalTagThrough)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
self.local_models = [LocalTagThrough, LocalBookWithM2MThrough]
|
self.local_models = [LocalTagThrough, LocalBookWithM2MThrough]
|
||||||
|
@ -720,6 +724,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
name = CharField(max_length=255)
|
name = CharField(max_length=255)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
self.local_models = [LocalAuthorWithM2M]
|
self.local_models = [LocalAuthorWithM2M]
|
||||||
|
@ -768,6 +773,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
tag = ForeignKey("schema.TagM2MTest")
|
tag = ForeignKey("schema.TagM2MTest")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
class LocalAuthorWithM2MThrough(Model):
|
class LocalAuthorWithM2MThrough(Model):
|
||||||
|
@ -775,6 +781,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
tags = M2MFieldClass("schema.TagM2MTest", related_name="authors", through=LocalAuthorTag)
|
tags = M2MFieldClass("schema.TagM2MTest", related_name="authors", through=LocalAuthorTag)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
self.local_models = [LocalAuthorTag, LocalAuthorWithM2MThrough]
|
self.local_models = [LocalAuthorTag, LocalAuthorWithM2MThrough]
|
||||||
|
@ -815,6 +822,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
tags = M2MFieldClass("TagM2MTest", related_name="books")
|
tags = M2MFieldClass("TagM2MTest", related_name="books")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
app_label = 'schema'
|
||||||
apps = new_apps
|
apps = new_apps
|
||||||
|
|
||||||
self.local_models = [LocalBookWithM2M]
|
self.local_models = [LocalBookWithM2M]
|
||||||
|
|
Loading…
Reference in New Issue