Refs #32983 -- Removed unneeded related_name from test model definitions.

This commit is contained in:
Nick Touran 2021-08-04 13:04:56 -07:00 committed by Carlton Gibson
parent d3c4696596
commit 1fb21ab377
2 changed files with 3 additions and 5 deletions

View File

@ -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},
})

View File

@ -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