fix tests on Django 2.0

This commit is contained in:
seroy 2018-01-22 01:10:12 +03:00 committed by Swen Kooij
parent bf0383d742
commit 6a4beca193
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class LocalizedExpressionsTestCase(TestCase):
cls.TestModel2 = get_fake_model( cls.TestModel2 = get_fake_model(
{ {
'text': LocalizedField(), 'text': LocalizedField(),
'other': models.ForeignKey(cls.TestModel1, related_name='features') 'other': models.ForeignKey(cls.TestModel1, related_name='features', on_delete=models.CASCADE)
} }
) )

View File

@ -175,7 +175,7 @@ class LocalizedSlugFieldTestCase(TestCase):
model = get_fake_model( model = get_fake_model(
{ {
'title': LocalizedField(), 'title': LocalizedField(),
'other': models.ForeignKey(model_fk), 'other': models.ForeignKey(model_fk, on_delete=models.CASCADE),
'slug': LocalizedUniqueSlugField(populate_from=('title', 'other.name')) 'slug': LocalizedUniqueSlugField(populate_from=('title', 'other.name'))
} }
) )