      model = BasicModel
      paginate_by = 10
  
  
  class TestPaginatedView(TestCase):
      def setUp(self):
          """
          Create 26 BasicModel intances.
          """
          for char in 'abcdefghijklmnopqrstuvwxyz':
 
</s> remove     pass
 </s> add     pagination_serializer_class = api_settings.PAGINATION_SERIALIZER
    paginate_by = api_settings.PAGINATE_BY

    def get_pagination_serializer_class(self):
        """
        Return the class to use for the pagination serializer.
        """
        class SerializerClass(self.pagination_serializer_class):
            class Meta:
                object_serializer_class = self.get_serializer_class()

        return SerializerClass

    def get_pagination_serializer(self, page=None):
        pagination_serializer_class = self.get_pagination_serializer_class()
        context = self.get_serializer_context()
        return pagination_serializer_class(instance=page, context=context) </s> remove     pagination_serializer_class = api_settings.PAGINATION_SERIALIZER
    paginate_by = api_settings.PAGINATE_BY
 </s> add  </s> remove class PaginationSerializer(serializers.Serializer):
    count = serializers.Field(source='paginator.count')
    next = NextPageField(source='*')
    previous = PreviousPageField(source='*')
 </s> add class PaginationSerializerOptions(serializers.SerializerOptions):
    """
    An object that stores the options that may be provided to a
    pagination serializer by using the inner `Meta` class.

    Accessible on the instance as `serializer.opts`.
    """
    def __init__(self, meta):
        super(PaginationSerializerOptions, self).__init__(meta)
        self.object_serializer_class = getattr(meta, 'object_serializer_class',
                                               serializers.Field)


class BasePaginationSerializer(serializers.Serializer):
    """
    A base class for pagination serializers to inherit from,
    to make implementing custom serializers more easy.
    """
    _options_class = PaginationSerializerOptions
    _results_field = 'results'

    def __init__(self, *args, **kwargs):
        """
        Override init to add in the object serializer field on-the-fly.
        """
        super(BasePaginationSerializer, self).__init__(*args, **kwargs)
        results_field = self._results_field
        object_serializer = self.opts.object_serializer_class
        self.fields[results_field] = object_serializer(source='object_list') </s> remove     Meta class options for ModelSerializer
 </s> add     Meta class options for Serializer
class IntegrationTestPagination(TestCase):
    """
    Integration tests for paginated list views.
    """

      model = BasicModel
      paginate_by = 10
  
  
class IntegrationTestPagination(TestCase):
    """
    Integration tests for paginated list views.
    """

      def setUp(self):
          """
          Create 26 BasicModel intances.
          """
          for char in 'abcdefghijklmnopqrstuvwxyz':
keep keep keep keep replace keep keep keep keep keep
 Expand pagination support, add docs 
rest_framework/tests/pagination.py