Ticket #20535: #20535-tests_master.diff
File #20535-tests_master.diff, 572 bytes (added by , 11 years ago) |
---|
-
django/tests/m2m_through/tests.py
class M2mThroughTests(TestCase): 343 343 ], 344 344 attrgetter("name") 345 345 ) 346 347 def test_ticket_20535_join_trimming(self): 348 qs = Friendship.objects.filter(first__rel_to_set__first__id=1) 349 self.assertEqual(str(qs.query).count('JOIN'), 1) 350 351 def test_ticket_20535_no_join_trimming(self): 352 qs = Friendship.objects.filter(first__rel_to_set__first__id=1, first__name='Jane') 353 self.assertEqual(str(qs.query).count('JOIN'), 2)