diff options
| author | Tom Christie | 2013-06-28 17:17:39 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-06-28 17:17:39 +0100 |
| commit | 7224b20d58ceee22abc987980ab646ab8cb2d8dc (patch) | |
| tree | acbe0ee1eb19e22d561ca93e7fdab18f3a1e53ff /rest_framework/tests/test_pagination.py | |
| parent | 4ee9cdc7aff30fc3f45e78292da77b5989bb0e23 (diff) | |
| download | django-rest-framework-7224b20d58ceee22abc987980ab646ab8cb2d8dc.tar.bz2 | |
Added APIRequestFactory
Diffstat (limited to 'rest_framework/tests/test_pagination.py')
| -rw-r--r-- | rest_framework/tests/test_pagination.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rest_framework/tests/test_pagination.py b/rest_framework/tests/test_pagination.py index e538a78e..85d4640e 100644 --- a/rest_framework/tests/test_pagination.py +++ b/rest_framework/tests/test_pagination.py @@ -4,13 +4,13 @@ from decimal import Decimal from django.db import models from django.core.paginator import Paginator from django.test import TestCase -from django.test.client import RequestFactory from django.utils import unittest from rest_framework import generics, status, pagination, filters, serializers from rest_framework.compat import django_filters +from rest_framework.test import APIRequestFactory from rest_framework.tests.models import BasicModel -factory = RequestFactory() +factory = APIRequestFactory() class FilterableItem(models.Model): @@ -369,7 +369,7 @@ class TestCustomPaginationSerializer(TestCase): self.page = paginator.page(1) def test_custom_pagination_serializer(self): - request = RequestFactory().get('/foobar') + request = APIRequestFactory().get('/foobar') serializer = CustomPaginationSerializer( instance=self.page, context={'request': request} |
