diff --git a/tests/modeltests/many_to_many/models.py b/tests/modeltests/many_to_many/models.py
index 5076e35..9e99f77 100644
a
|
b
|
class Article(models.Model):
|
28 | 28 | |
29 | 29 | class Meta: |
30 | 30 | ordering = ('headline',) |
| 31 | |
| 32 | |
| 33 | class Company( models.Model ): |
| 34 | name = models.CharField(max_length=100) |
| 35 | articles = models.ManyToManyField(Article, related_name='+') |
| 36 | |
| 37 | |
| 38 | class Location( models.Model ): |
| 39 | company = models.ForeignKey(Company) |
| 40 | address = models.CharField(max_length=100) |
| 41 | articles = models.ManyToManyField(Article, related_name='+') |
diff --git a/tests/modeltests/many_to_many/tests.py b/tests/modeltests/many_to_many/tests.py
index 44bdde3..5815b47 100644
a
|
b
|
class ManyToManyTests(TestCase):
|
387 | 387 | self.assertQuerysetEqual(self.a4.publications.all(), []) |
388 | 388 | self.assertQuerysetEqual(self.p2.article_set.all(), |
389 | 389 | ['<Article: NASA finds intelligent life on Earth>']) |
| 390 | |
| 391 | def test_related_name(self): |
| 392 | c = Company.objects.create(name='Foo') |
| 393 | print c.articles.all().query |
| 394 | |