@@ -407,7 +407,6 @@ def test_registration(self):
407
407
408
408
@override_settings (REST_AUTH_REGISTER_PERMISSION_CLASSES = (CustomPermissionClass ,))
409
409
def test_registration_with_custom_permission_class (self ):
410
-
411
410
class CustomRegisterView (RegisterView ):
412
411
permission_classes = register_permission_classes ()
413
412
authentication_classes = ()
@@ -477,7 +476,7 @@ def test_registration_with_email_verification(self):
477
476
)
478
477
479
478
# verify email
480
- email_confirmation = new_user .emailaddress_set .get (email = self .EMAIL )\
479
+ email_confirmation = new_user .emailaddress_set .get (email = self .EMAIL ) \
481
480
.emailconfirmation_set .order_by ('-created' )[0 ]
482
481
self .post (
483
482
self .verify_email_url ,
@@ -526,7 +525,6 @@ def test_login_jwt_sets_cookie(self):
526
525
resp = self .post (self .login_url , data = payload , status_code = 200 )
527
526
self .assertTrue ('jwt-auth' in resp .cookies .keys ())
528
527
529
-
530
528
@override_settings (REST_USE_JWT = True )
531
529
@override_settings (JWT_AUTH_COOKIE = 'jwt-auth' )
532
530
def test_logout_jwt_deletes_cookie (self ):
@@ -539,7 +537,6 @@ def test_logout_jwt_deletes_cookie(self):
539
537
resp = self .post (self .logout_url , status = 200 )
540
538
self .assertEqual ('' , resp .cookies .get ('jwt-auth' ).value )
541
539
542
-
543
540
@override_settings (REST_USE_JWT = True )
544
541
@override_settings (JWT_AUTH_COOKIE = 'jwt-auth' )
545
542
@override_settings (REST_FRAMEWORK = dict (
@@ -557,4 +554,4 @@ def test_cookie_authentication(self):
557
554
resp = self .post (self .login_url , data = payload , status_code = 200 )
558
555
self .assertEqual (['jwt-auth' ], list (resp .cookies .keys ()))
559
556
resp = self .get ('/protected-view/' )
560
- self .assertEquals (resp .status_code , 200 )
557
+ self .assertEquals (resp .status_code , 200 )
0 commit comments