'When using a ManyToMany in list_filter at the second level behind a
ForeignKey, distinct() must be called and results shouldn\'t appear more
than once.'

def test_distinct_for_through_m2m_at_second_level_in_list_filter(self):

    lead = Musician.objects.create(name='Vox')
    band = Group.objects.create(name='The    Hype')
    Concert.objects.create(name='Woodstock', group=band)
    Membership.objects.create(group=band, music=lead, role='lead    voice')
    Membership.objects.create(group=band, music=lead, role='bass    player')
    m = ConcertAdmin(Concert, custom_site)
    request = self.factory.get('/concert/', data={'group__members': lead.pk})
    cl = ChangeList(request, Concert, *get_changelist_args(m))
    cl.get_results(request)
    self.assertEqual(cl.result_count, 1)
