mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-03 06:13:43 +03:00
Bumps version, fixes import ordering
This commit is contained in:
parent
1eaa8edd0e
commit
c933513438
|
@ -36,4 +36,3 @@ PasswordResetConfirmSerializer = serializers.get(
|
|||
PasswordChangeSerializer = import_callable(serializers.get('PASSWORD_CHANGE_SERIALIZER', DefaultPasswordChangeSerializer))
|
||||
|
||||
JWT_AUTH_COOKIE = getattr(settings, 'JWT_AUTH_COOKIE', None)
|
||||
|
||||
|
|
|
@ -407,7 +407,6 @@ class APIBasicTests(TestsMixin, TestCase):
|
|||
|
||||
@override_settings(REST_AUTH_REGISTER_PERMISSION_CLASSES=(CustomPermissionClass,))
|
||||
def test_registration_with_custom_permission_class(self):
|
||||
|
||||
class CustomRegisterView(RegisterView):
|
||||
permission_classes = register_permission_classes()
|
||||
authentication_classes = ()
|
||||
|
@ -477,7 +476,7 @@ class APIBasicTests(TestsMixin, TestCase):
|
|||
)
|
||||
|
||||
# verify email
|
||||
email_confirmation = new_user.emailaddress_set.get(email=self.EMAIL)\
|
||||
email_confirmation = new_user.emailaddress_set.get(email=self.EMAIL) \
|
||||
.emailconfirmation_set.order_by('-created')[0]
|
||||
self.post(
|
||||
self.verify_email_url,
|
||||
|
@ -526,7 +525,6 @@ class APIBasicTests(TestsMixin, TestCase):
|
|||
resp = self.post(self.login_url, data=payload, status_code=200)
|
||||
self.assertTrue('jwt-auth' in resp.cookies.keys())
|
||||
|
||||
|
||||
@override_settings(REST_USE_JWT=True)
|
||||
@override_settings(JWT_AUTH_COOKIE='jwt-auth')
|
||||
def test_logout_jwt_deletes_cookie(self):
|
||||
|
@ -539,7 +537,6 @@ class APIBasicTests(TestsMixin, TestCase):
|
|||
resp = self.post(self.logout_url, status=200)
|
||||
self.assertEqual('', resp.cookies.get('jwt-auth').value)
|
||||
|
||||
|
||||
@override_settings(REST_USE_JWT=True)
|
||||
@override_settings(JWT_AUTH_COOKIE='jwt-auth')
|
||||
@override_settings(REST_FRAMEWORK=dict(
|
||||
|
@ -557,4 +554,4 @@ class APIBasicTests(TestsMixin, TestCase):
|
|||
resp = self.post(self.login_url, data=payload, status_code=200)
|
||||
self.assertEqual(['jwt-auth'], list(resp.cookies.keys()))
|
||||
resp = self.get('/protected-view/')
|
||||
self.assertEquals(resp.status_code, 200)
|
||||
self.assertEquals(resp.status_code, 200)
|
||||
|
|
|
@ -10,10 +10,10 @@ from dj_rest_auth.social_serializers import (TwitterConnectSerializer,
|
|||
from dj_rest_auth.urls import urlpatterns
|
||||
from django.conf.urls import include, url
|
||||
from django.views.generic import TemplateView
|
||||
from rest_framework.decorators import api_view
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import permissions
|
||||
from rest_framework.decorators import api_view
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from . import django_urls
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user