Fixed test failure that was occurring since r12908

The tests were relying on being able to do
ManyToManyField("NameOfThisModel") instead of the only documented method for
recursive relationships, namely ManyToManyField("self").  The former stopped
working when the fix in r12908 was applied.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant 2010-04-06 12:18:56 +00:00
parent f7814cdfe6
commit 21236fa0a2
1 changed files with 6 additions and 6 deletions

View File

@ -80,10 +80,10 @@ class ValidM2M(models.Model):
# M2M fields are symmetrical by default. Symmetrical M2M fields
# on self don't require a related accessor, so many potential
# clashes are avoided.
validm2m_set = models.ManyToManyField("ValidM2M")
validm2m_set = models.ManyToManyField("self")
m2m_1 = models.ManyToManyField("ValidM2M", related_name='id')
m2m_2 = models.ManyToManyField("ValidM2M", related_name='src_safe')
m2m_1 = models.ManyToManyField("self", related_name='id')
m2m_2 = models.ManyToManyField("self", related_name='src_safe')
m2m_3 = models.ManyToManyField('self')
m2m_4 = models.ManyToManyField('self')
@ -94,10 +94,10 @@ class SelfClashM2M(models.Model):
# Non-symmetrical M2M fields _do_ have related accessors, so
# there is potential for clashes.
selfclashm2m_set = models.ManyToManyField("SelfClashM2M", symmetrical=False)
selfclashm2m_set = models.ManyToManyField("self", symmetrical=False)
m2m_1 = models.ManyToManyField("SelfClashM2M", related_name='id', symmetrical=False)
m2m_2 = models.ManyToManyField("SelfClashM2M", related_name='src_safe', symmetrical=False)
m2m_1 = models.ManyToManyField("self", related_name='id', symmetrical=False)
m2m_2 = models.ManyToManyField("self", related_name='src_safe', symmetrical=False)
m2m_3 = models.ManyToManyField('self', symmetrical=False)
m2m_4 = models.ManyToManyField('self', symmetrical=False)