(self)
| 3891 | self.assertEqual(str(qs.query).count("JOIN"), 1) |
| 3892 | |
| 3893 | def test_fk_reuse_annotation(self): |
| 3894 | qs = Annotation.objects.filter(tag__name="foo").annotate(cnt=Count("tag__name")) |
| 3895 | self.assertEqual(str(qs.query).count("JOIN"), 1) |
| 3896 | |
| 3897 | def test_fk_reuse_disjunction(self): |
| 3898 | qs = Annotation.objects.filter(Q(tag__name="foo") | Q(tag__name="bar")) |