def test_pagination_page_range(self):
        # instantiating and setting up ChangeList object
        m = GroupAdmin(Group, admin.site)
        request = self.factory.get('/group/')
        cl = ChangeList(request, Group, m.list_display,
                m.list_display_links, m.list_filter, m.date_hierarchy,
                m.search_fields, m.list_select_related, m.list_per_page,
                m.list_max_show_all, m.list_editable, m)
        per_page = cl.list_per_page = 10

        for page_num, objects_count, expected_page_range in [
            (0, per_page, []),
            (0, per_page * 2, list(range(2))),
            (5, per_page * 11, list(range(11))),
            (5, per_page * 12, [0, 1, 2, 3, 4, 5, 6, 7, 8, '.', 10, 11]),
            (6, per_page * 12, [0, 1, '.', 3, 4, 5, 6, 7, 8, 9, 10, 11]),
            (6, per_page * 13, [0, 1, '.', 3, 4, 5, 6, 7, 8, 9, '.', 11, 12]),
        ]:
            # assuming we have exactly `objects_count` objects
            Group.objects.all().delete()
            for i in range(objects_count):
                Group.objects.create(name='test band')

            # setting page number and calculating page range
            cl.page_num = page_num
            cl.get_results(request)
            real_page_range = pagination(cl)['page_range']

            self.assertListEqual(
                expected_page_range,
                list(real_page_range),
            )
Determines whether the request is a byte-range request
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/tests/admin_changelist/tests.py/ChangeListTests.test_pagination_page_range--crossover with--dataset/ETHPy150Open openstack/storlets/Engine/swift/storlet_middleware/storlet_handler.py/BaseStorletHandler.is_range_request