

def test_can_request_all_events(self):
    events_url = reverse('all_events')
    events_url += '?items_per_page=all'
    response = self.client.get(events_url)
    view_events = response.context['all_events']
    all_events = list(Event.objects.all())
    if (sys.version_info >= (3,)):
        self.assertCountEqual(view_events, all_events)
    else:
        events_url.assertItemsEqual(view_events, all_events)

dataset/ETHPy150Open swcarpentry/amy/workshops/test/test_event.py TestEventViews.test_can_request_all_events/VarMisuse@82/125 `self`->`events_url`