          queryset = self.paginate_queryset(request)
          assert [item.created for item in queryset] == [16, 17, 18, 19, 20]
  
          next_url = self.pagination.get_next_link()
          assert next_url is None
  
          # assert content == {
          #     'results': [1, 2, 3, 4, 5],
          #     'previous': None,
          #     'next': 'http://testserver/?limit=5&offset=5',
 
</s> remove         assert [item.created for item in queryset] == [16, 17, 18, 19, 20]
 </s> add         assert [item.created for item in queryset] == [1, 1, 1, 1, 1] </s> remove         last_item = self.page[-1]
        position = self.get_position_from_instance(last_item, self.ordering)
        cursor = Cursor(offset=0, reverse=False, position=position)
 </s> add         compare = self.get_position_from_instance(self.next_item, self.ordering)
        offset = 0
        for item in reversed(self.page):
            position = self.get_position_from_instance(item, self.ordering)
            if position != compare:
                # The item in this position and the item following it
                # have different positions. We can use this position as
                # our marker.
                break

            # The item in this postion has the same position as the item
            # following it, we can't use it as a marker position, so increment
            # the offset and keep seeking to the previous item.
            compare = position
            offset += 1

        else:
            if self.cursor is None:
                # There were no unique positions in the page, and we were
                # on the first page, ie. there was no existing cursor.
                # Our cursor will have an offset equal to the page size,
                # but no position to filter against yet.
                offset = self.page_size
                position = ''
            else:
                # There were no unique positions in the page.
                # Use the position from the existing cursor and increment
                # it's offset by the page size.
                offset = self.cursor.offset + self.page_size
                position = self.cursor.position

        cursor = Cursor(offset=offset, reverse=False, position=position) </s> remove         results = list(queryset[:self.page_size + 1])
 </s> add         # The offset is used in order to deal with cases where we have
        # items with an identical position. This allows the cursors
        # to gracefully deal with non-unique fields as the ordering.
        offset = 0 if (self.cursor is None) else self.cursor.offset

        # We fetch an extra item in order to determine if there is a next page.
        results = list(queryset[offset:offset + self.page_size + 1]) </s> remove             cursor = None
 </s> add             self.cursor = None
        assert next_url

        request = Request(factory.get(next_url))
        queryset = self.paginate_queryset(request)
        assert [item.created for item in queryset] == [1, 1, 2, 3, 4]

        next_url = self.pagination.get_next_link()
        assert next_url

        request = Request(factory.get(next_url))
        queryset = self.paginate_queryset(request)
        assert [item.created for item in queryset] == [5, 6, 7, 8, 9]
          queryset = self.paginate_queryset(request)
          assert [item.created for item in queryset] == [16, 17, 18, 19, 20]
  
          next_url = self.pagination.get_next_link()
        assert next_url

        request = Request(factory.get(next_url))
        queryset = self.paginate_queryset(request)
        assert [item.created for item in queryset] == [1, 1, 2, 3, 4]

        next_url = self.pagination.get_next_link()
        assert next_url

        request = Request(factory.get(next_url))
        queryset = self.paginate_queryset(request)
        assert [item.created for item in queryset] == [5, 6, 7, 8, 9]
  
          # assert content == {
          #     'results': [1, 2, 3, 4, 5],
          #     'previous': None,
          #     'next': 'http://testserver/?limit=5&offset=5',
keep keep keep keep replace keep keep keep keep keep
 Add offset support for cursor pagination 
tests/test_pagination.py