aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2013-05-31 11:17:33 +0100
committerTom Christie2013-05-31 11:17:33 +0100
commitc36ff4e052f0a6a188100908b03d2c3328fd97bc (patch)
treefa0d871a2b11cae1e9df5ec837ac8b9ddccb60e5
parentfdf9a267405d585f37412c004e289a0a8e9b0a5c (diff)
downloaddjango-rest-framework-c36ff4e052f0a6a188100908b03d2c3328fd97bc.tar.bz2
Cleaning up imports and whitespace
-rw-r--r--rest_framework/tests/models.py2
-rw-r--r--rest_framework/tests/test_authentication.py4
-rw-r--r--rest_framework/tests/test_routers.py4
3 files changed, 3 insertions, 7 deletions
diff --git a/rest_framework/tests/models.py b/rest_framework/tests/models.py
index abf50a2d..e2d4eacd 100644
--- a/rest_framework/tests/models.py
+++ b/rest_framework/tests/models.py
@@ -162,8 +162,8 @@ class NullableOneToOneSource(RESTFrameworkModel):
target = models.OneToOneField(OneToOneTarget, null=True, blank=True,
related_name='nullable_source')
+
# Serializer used to test BasicModel
class BasicModelSerializer(serializers.ModelSerializer):
class Meta:
model = BasicModel
-
diff --git a/rest_framework/tests/test_authentication.py b/rest_framework/tests/test_authentication.py
index 90e1f5c4..05e9fbc3 100644
--- a/rest_framework/tests/test_authentication.py
+++ b/rest_framework/tests/test_authentication.py
@@ -48,7 +48,7 @@ urlpatterns = patterns('',
(r'^token/$', MockView.as_view(authentication_classes=[TokenAuthentication])),
(r'^auth-token/$', 'rest_framework.authtoken.views.obtain_auth_token'),
(r'^oauth/$', MockView.as_view(authentication_classes=[OAuthAuthentication])),
- (r'^oauth-with-scope/$', MockView.as_view(authentication_classes=[OAuthAuthentication],
+ (r'^oauth-with-scope/$', MockView.as_view(authentication_classes=[OAuthAuthentication],
permission_classes=[permissions.TokenHasReadWriteScope]))
)
@@ -56,7 +56,7 @@ if oauth2_provider is not None:
urlpatterns += patterns('',
url(r'^oauth2/', include('provider.oauth2.urls', namespace='oauth2')),
url(r'^oauth2-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication])),
- url(r'^oauth2-with-scope-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication],
+ url(r'^oauth2-with-scope-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication],
permission_classes=[permissions.TokenHasReadWriteScope])),
)
diff --git a/rest_framework/tests/test_routers.py b/rest_framework/tests/test_routers.py
index 4e4765cb..c73f5e72 100644
--- a/rest_framework/tests/test_routers.py
+++ b/rest_framework/tests/test_routers.py
@@ -1,12 +1,10 @@
from __future__ import unicode_literals
from django.test import TestCase
from django.test.client import RequestFactory
-from rest_framework import status
from rest_framework.response import Response
from rest_framework import viewsets
from rest_framework.decorators import link, action
from rest_framework.routers import SimpleRouter
-import copy
factory = RequestFactory()
@@ -51,5 +49,3 @@ class TestSimpleRouter(TestCase):
else:
method_map = 'get'
self.assertEqual(route.mapping[method_map], endpoint)
-
-