# Path: tests/support/decorators.py

# 
# Path: tests/support/views.py
# class PaginateViewSet(ArtistViewSet):
#     """Viewset that implements JSON API pagination."""
# 
#     pagination_class = JSONAPILimitOffsetPagination
# 
# class NonJSONPaginateViewSet(ArtistViewSet):
#     """Tests when a viewset is paginated but without a JSONAPI Paginator."""
# 
#     pagination_class = LimitOffsetPagination


import json
from django.urls import reverse
from rest_framework.test import APIRequestFactory
from tests.support.decorators import mark_urls
from tests.support.views import PaginateViewSet, NonJSONPaginateViewSet




@mark_urls
def test_pagination_limit_offset(factory: APIRequestFactory) -> None:
    """Pagination works according to spec."""
    list_url = reverse("page-list")
    request = factory.get(list_url, {"offset": 2, "limit": 2})

# Path: tests/support/decorators.py

# 
# Path: tests/support/views.py
# class PaginateViewSet(ArtistViewSet):
#     """Viewset that implements JSON API pagination."""
# 
#     pagination_class = JSONAPILimitOffsetPagination
# 
# class NonJSONPaginateViewSet(ArtistViewSet):
#     """Tests when a viewset is paginated but without a JSONAPI Paginator."""
# 
#     pagination_class = LimitOffsetPagination


# Path: tests/test_pagination.py
import json
from django.urls import reverse
from rest_framework.test import APIRequestFactory
from tests.support.decorators import mark_urls
from tests.support.views import PaginateViewSet, NonJSONPaginateViewSet





@mark_urls
def test_pagination_limit_offset(factory: APIRequestFactory) -> None:
    """Pagination works according to spec."""
    list_url = reverse("page-list")
    request = factory.get(list_url, {"offset": 2, "limit": 2})

    view_list = PaginateViewSet.as_view({"get": "list"})