Skip to content

Commit

Permalink
fix(django): missing 1 required positional argument: 'get_response'
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Feb 23, 2021
1 parent 3cef9a2 commit d0be2ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions allauth/account/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def _test_signup_email_verified_externally(self, signup_email, verified_email):
from django.contrib.messages.middleware import MessageMiddleware
from django.contrib.sessions.middleware import SessionMiddleware

SessionMiddleware().process_request(request)
MessageMiddleware().process_request(request)
SessionMiddleware(lambda request: None).process_request(request)
MessageMiddleware(lambda request: None).process_request(request)
request.user = AnonymousUser()
request.session["account_verified_email"] = verified_email
from .views import signup
Expand Down Expand Up @@ -178,8 +178,8 @@ def test_signup_email_twice(self):
from django.contrib.messages.middleware import MessageMiddleware
from django.contrib.sessions.middleware import SessionMiddleware

SessionMiddleware().process_request(request)
MessageMiddleware().process_request(request)
SessionMiddleware(lambda request: None).process_request(request)
MessageMiddleware(lambda request: None).process_request(request)
request.user = AnonymousUser()
from .views import signup

Expand Down
12 changes: 6 additions & 6 deletions allauth/socialaccount/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ def test_email_address_created(self):
factory = RequestFactory()
request = factory.get("/accounts/login/callback/")
request.user = AnonymousUser()
SessionMiddleware().process_request(request)
MessageMiddleware().process_request(request)
SessionMiddleware(lambda request: None).process_request(request)
MessageMiddleware(lambda request: None).process_request(request)

User = get_user_model()
user = User()
Expand Down Expand Up @@ -376,8 +376,8 @@ def test_populate_username_in_blacklist(self):
factory = RequestFactory()
request = factory.get("/accounts/twitter/login/callback/")
request.user = AnonymousUser()
SessionMiddleware().process_request(request)
MessageMiddleware().process_request(request)
SessionMiddleware(lambda request: None).process_request(request)
MessageMiddleware(lambda request: None).process_request(request)

User = get_user_model()
user = User()
Expand Down Expand Up @@ -413,8 +413,8 @@ def _email_address_clash(self, username, email):
factory = RequestFactory()
request = factory.get("/accounts/twitter/login/callback/")
request.user = AnonymousUser()
SessionMiddleware().process_request(request)
MessageMiddleware().process_request(request)
SessionMiddleware(lambda request: None).process_request(request)
MessageMiddleware(lambda request: None).process_request(request)
resp = complete_social_login(request, sociallogin)
return request, resp

Expand Down

0 comments on commit d0be2ff

Please sign in to comment.