mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-16 19:41:06 +03:00
Cleaning up imports and whitespace
This commit is contained in:
parent
fdf9a26740
commit
c36ff4e052
|
@ -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
|
||||
|
||||
|
|
|
@ -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])),
|
||||
)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user