def METHOD_NAME(self):
    self.create_events()
    pr = models.PullRequest.objects.latest()
    latest_event = pr.events.latest()
    # 1. main PullRequest query
    # 2. latest() for each PullRequest
    # 3. jobs query below
    with self.assertNumQueries(3):
        info = EventsStatus.get_single_event_for_open_prs([pr.pk])
        self.assertEqual(len(info), 1) # should only have the latest event
        self.assertEqual(info[0].pk, latest_event.pk)
        # pre, test, test1, merge
        self.assertEqual(info[0].jobs.count(), 4)
    with self.assertNumQueries(0):
        info = EventsStatus.get_single_event_for_open_prs([pr.pk], filter_repo_ids=[])
        self.assertEqual(len(info), 0)
    with self.assertNumQueries(2):
        info = EventsStatus.get_single_event_for_open_prs([pr.pk], filter_repo_ids=[self.repo.id])
        self.assertEqual(len(info), 1)
    last_modified = latest_event.last_modified + datetime.timedelta(0,10)
    with self.assertNumQueries(2):
        info = EventsStatus.get_single_event_for_open_prs([pr.pk], last_modified)
        self.assertEqual(len(info), 0)
    last_modified = latest_event.last_modified - datetime.timedelta(0,10)
    with self.assertNumQueries(2):
        info = EventsStatus.get_single_event_for_open_prs([pr.pk], last_modified)
        self.assertEqual(len(info), 1)
        self.assertEqual(info[0].pk, latest_event.pk)