def check_indexes(self, params, page_num, indexes):
        paginator = Paginator(*params)
        if page_num == 'first':
            page_num = 1
        elif page_num == 'last':
            page_num = paginator.num_pages
        page = paginator.page(page_num)
        start, end = indexes
        msg = ("For %s of page %s, expected %s but got %s."
               " Paginator parameters were: %s")
        self.assertEqual(start, page.start_index(),
            msg % ('start index', page_num, start, page.start_index(), params))
        self.assertEqual(end, page.end_index(),
            msg % ('end index', page_num, end, page.end_index(), params))
Helper method that instantiates a Paginator object from the passed
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/tests/regressiontests/pagination_regress/tests.py/PaginatorTests.check_indexes