diff --git a/tests/field_deconstruction/tests.py b/tests/field_deconstruction/tests.py index 846f6d3ed71..b2fb0971004 100644 --- a/tests/field_deconstruction/tests.py +++ b/tests/field_deconstruction/tests.py @@ -438,7 +438,6 @@ class FieldDeconstructionTests(SimpleTestCase): m2m = models.ManyToManyField('self') m2m_related_name = models.ManyToManyField( 'self', - related_name='custom_name', related_query_name='custom_query_name', limit_choices_to={'flag': True}, ) @@ -455,7 +454,6 @@ class FieldDeconstructionTests(SimpleTestCase): self.assertEqual(args, []) self.assertEqual(kwargs, { 'to': 'field_deconstruction.MyModel', - 'related_name': 'custom_name', 'related_query_name': 'custom_query_name', 'limit_choices_to': {'flag': True}, }) diff --git a/tests/model_meta/models.py b/tests/model_meta/models.py index f6abf2144fa..b240832d063 100644 --- a/tests/model_meta/models.py +++ b/tests/model_meta/models.py @@ -23,7 +23,7 @@ class AbstractPerson(models.Model): # M2M fields m2m_abstract = models.ManyToManyField(Relation, related_name='m2m_abstract_rel') - friends_abstract = models.ManyToManyField('self', related_name='friends_abstract', symmetrical=True) + friends_abstract = models.ManyToManyField('self', symmetrical=True) following_abstract = models.ManyToManyField('self', related_name='followers_abstract', symmetrical=False) # VIRTUAL fields @@ -60,7 +60,7 @@ class BasePerson(AbstractPerson): # M2M fields m2m_base = models.ManyToManyField(Relation, related_name='m2m_base_rel') - friends_base = models.ManyToManyField('self', related_name='friends_base', symmetrical=True) + friends_base = models.ManyToManyField('self', symmetrical=True) following_base = models.ManyToManyField('self', related_name='followers_base', symmetrical=False) # VIRTUAL fields @@ -88,7 +88,7 @@ class Person(BasePerson): # M2M Fields m2m_inherited = models.ManyToManyField(Relation, related_name='m2m_concrete_rel') - friends_inherited = models.ManyToManyField('self', related_name='friends_concrete', symmetrical=True) + friends_inherited = models.ManyToManyField('self', symmetrical=True) following_inherited = models.ManyToManyField('self', related_name='followers_concrete', symmetrical=False) # VIRTUAL fields