aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_pagination.py
diff options
context:
space:
mode:
authorTom Christie2014-08-19 13:54:52 +0100
committerTom Christie2014-08-19 13:54:52 +0100
commitd2795dd26d7483ea0de119ae135eab0a94cf23d8 (patch)
tree218df2d9c5fc3db3626974b8f7424e80b92641c8 /tests/test_pagination.py
parent19f31340627c949ca07a9e7b59299734fd991f75 (diff)
downloaddjango-rest-framework-d2795dd26d7483ea0de119ae135eab0a94cf23d8.tar.bz2
Resolve linting issues
Diffstat (limited to 'tests/test_pagination.py')
-rw-r--r--tests/test_pagination.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_pagination.py b/tests/test_pagination.py
index d5b9244d..80c33e2e 100644
--- a/tests/test_pagination.py
+++ b/tests/test_pagination.py
@@ -363,11 +363,11 @@ class TestMaxPaginateByParam(TestCase):
self.assertEqual(response.data['results'], self.data[:3])
-### Tests for context in pagination serializers
+# Tests for context in pagination serializers
class CustomField(serializers.Field):
def to_native(self, value):
- if not 'view' in self.context:
+ if 'view' not in self.context:
raise RuntimeError("context isn't getting passed into custom field")
return "value"
@@ -377,7 +377,7 @@ class BasicModelSerializer(serializers.Serializer):
def __init__(self, *args, **kwargs):
super(BasicModelSerializer, self).__init__(*args, **kwargs)
- if not 'view' in self.context:
+ if 'view' not in self.context:
raise RuntimeError("context isn't getting passed into serializer init")
@@ -398,7 +398,7 @@ class TestContextPassedToCustomField(TestCase):
self.assertEqual(response.status_code, status.HTTP_200_OK)
-### Tests for custom pagination serializers
+# Tests for custom pagination serializers
class LinksSerializer(serializers.Serializer):
next = pagination.NextPageField(source='*')