Commit c36ff4e0 by Tom Christie

Cleaning up imports and whitespace

parent fdf9a267
...@@ -162,8 +162,8 @@ class NullableOneToOneSource(RESTFrameworkModel): ...@@ -162,8 +162,8 @@ class NullableOneToOneSource(RESTFrameworkModel):
target = models.OneToOneField(OneToOneTarget, null=True, blank=True, target = models.OneToOneField(OneToOneTarget, null=True, blank=True,
related_name='nullable_source') related_name='nullable_source')
# Serializer used to test BasicModel # Serializer used to test BasicModel
class BasicModelSerializer(serializers.ModelSerializer): class BasicModelSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = BasicModel model = BasicModel
...@@ -48,7 +48,7 @@ urlpatterns = patterns('', ...@@ -48,7 +48,7 @@ urlpatterns = patterns('',
(r'^token/$', MockView.as_view(authentication_classes=[TokenAuthentication])), (r'^token/$', MockView.as_view(authentication_classes=[TokenAuthentication])),
(r'^auth-token/$', 'rest_framework.authtoken.views.obtain_auth_token'), (r'^auth-token/$', 'rest_framework.authtoken.views.obtain_auth_token'),
(r'^oauth/$', MockView.as_view(authentication_classes=[OAuthAuthentication])), (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])) permission_classes=[permissions.TokenHasReadWriteScope]))
) )
...@@ -56,7 +56,7 @@ if oauth2_provider is not None: ...@@ -56,7 +56,7 @@ if oauth2_provider is not None:
urlpatterns += patterns('', urlpatterns += patterns('',
url(r'^oauth2/', include('provider.oauth2.urls', namespace='oauth2')), url(r'^oauth2/', include('provider.oauth2.urls', namespace='oauth2')),
url(r'^oauth2-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication])), 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])), permission_classes=[permissions.TokenHasReadWriteScope])),
) )
......
from __future__ import unicode_literals from __future__ import unicode_literals
from django.test import TestCase from django.test import TestCase
from django.test.client import RequestFactory from django.test.client import RequestFactory
from rest_framework import status
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework import viewsets from rest_framework import viewsets
from rest_framework.decorators import link, action from rest_framework.decorators import link, action
from rest_framework.routers import SimpleRouter from rest_framework.routers import SimpleRouter
import copy
factory = RequestFactory() factory = RequestFactory()
...@@ -51,5 +49,3 @@ class TestSimpleRouter(TestCase): ...@@ -51,5 +49,3 @@ class TestSimpleRouter(TestCase):
else: else:
method_map = 'get' method_map = 'get'
self.assertEqual(route.mapping[method_map], endpoint) self.assertEqual(route.mapping[method_map], endpoint)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment