diff --git a/tests/generic_relations_regress/models.py b/tests/generic_relations_regress/models.py
index 331c575..ac97419 100644
a
|
b
|
class Person(models.Model):
|
61 | 61 | |
62 | 62 | |
63 | 63 | class CharLink(models.Model): |
| 64 | title = models.CharField(max_length=20) |
64 | 65 | content_type = models.ForeignKey(ContentType, models.CASCADE) |
65 | 66 | object_id = models.CharField(max_length=100) |
66 | 67 | content_object = GenericForeignKey() |
67 | 68 | |
68 | 69 | |
69 | 70 | class TextLink(models.Model): |
| 71 | title = models.CharField(max_length=20) |
70 | 72 | content_type = models.ForeignKey(ContentType, models.CASCADE) |
71 | 73 | object_id = models.TextField() |
72 | 74 | content_object = GenericForeignKey() |
diff --git a/tests/generic_relations_regress/tests.py b/tests/generic_relations_regress/tests.py
index b6782fe..8861653 100644
a
|
b
|
class GenericRelationTests(TestCase):
|
50 | 50 | TextLink.objects.create(content_object=oddrel) |
51 | 51 | oddrel.delete() |
52 | 52 | |
| 53 | def test_charlink_filter(self): |
| 54 | # Regression for #16055 |
| 55 | oddrel = OddRelation1.objects.create(name='clink') |
| 56 | cl = CharLink.objects.create(content_object=oddrel, title='title') |
| 57 | list(OddRelation1.objects.filter(clinks__title='title')) |
| 58 | |
| 59 | def test_textlink_filter(self): |
| 60 | # Regression for #16055 |
| 61 | oddrel = OddRelation2.objects.create(name='tlink') |
| 62 | tl = TextLink.objects.create(content_object=oddrel, title='title') |
| 63 | list(OddRelation2.objects.filter(tlinks__title='title')) |
| 64 | |
53 | 65 | def test_q_object_or(self): |
54 | 66 | """ |
55 | 67 | Tests that SQL query parameters for generic relations are properly |