Skip to content

Commit

Permalink
Bumps version, fixes import ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
iMerica committed Mar 28, 2020
1 parent 1eaa8ed commit c933513
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion dj_rest_auth/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@
PasswordChangeSerializer = import_callable(serializers.get('PASSWORD_CHANGE_SERIALIZER', DefaultPasswordChangeSerializer))

JWT_AUTH_COOKIE = getattr(settings, 'JWT_AUTH_COOKIE', None)

7 changes: 2 additions & 5 deletions dj_rest_auth/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ def test_registration(self):

@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 = ()
Expand Down Expand Up @@ -477,7 +476,7 @@ def test_registration_with_email_verification(self):
)

# 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,
Expand Down Expand Up @@ -526,7 +525,6 @@ def test_login_jwt_sets_cookie(self):
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):
Expand All @@ -539,7 +537,6 @@ def test_logout_jwt_deletes_cookie(self):
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(
Expand All @@ -557,4 +554,4 @@ def test_cookie_authentication(self):
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)
4 changes: 2 additions & 2 deletions dj_rest_auth/tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
from dj_rest_auth.urls import urlpatterns
from django.conf.urls import include, url
from django.views.generic import TemplateView
from rest_framework import permissions
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.views import APIView

from . import django_urls

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='dj-rest-auth',
version='0.2.0',
version='1.0.0',
author='iMerica',
author_email='imichael@pm.me',
url='http://github.com/jazzband/dj-rest-auth',
Expand Down

0 comments on commit c933513

Please sign in to comment.