Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(test): bump django-allauth to 0.62.1 #627

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions dj_rest_auth/registration/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,13 @@ def validate(self, attrs):
_('Define client_class in view'),
)

provider = adapter.get_provider()
scope = provider.get_scope(request)
client = self.client_class(
request,
app.client_id,
app.secret,
adapter.access_token_method,
adapter.access_token_url,
self.callback_url,
scope,
scope_delimiter=adapter.scope_delimiter,
headers=adapter.headers,
basic_auth=adapter.basic_auth,
Expand Down
2 changes: 1 addition & 1 deletion dj_rest_auth/tests/requirements.pip
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coveralls==1.11.1
django-allauth==0.61.1
django-allauth[socialaccount]==0.62.1
djangorestframework-simplejwt>=5.3.1
flake8==3.8.4
responses==0.12.1
Expand Down
6 changes: 4 additions & 2 deletions dj_rest_auth/tests/test_serializers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
from allauth.socialaccount.providers.facebook.views import FacebookProvider
from allauth.socialaccount.providers.facebook.provider import FacebookProvider
from allauth.socialaccount.models import SocialApp
from allauth.core.exceptions import ImmediateHttpResponse
from django.contrib.auth import get_user_model
from django.urls import reverse
from django.core.exceptions import ValidationError
from django.test import TestCase, modify_settings, override_settings
from django.contrib.sites.models import Site
from django.contrib.sessions.middleware import SessionMiddleware
from django.http import HttpResponseBadRequest
from rest_framework.exceptions import ErrorDetail
from rest_framework.test import APIRequestFactory, force_authenticate
Expand Down Expand Up @@ -119,6 +120,7 @@ class TestSocialLoginSerializer(TestCase):
def setUpTestData(cls):
cls.request_data = {"access_token": "token1234"}
cls.request = APIRequestFactory().post(cls.request_data, format='json')
cls.request.session = {}
social_app = SocialApp.objects.create(
provider='facebook',
name='Facebook',
Expand Down Expand Up @@ -148,7 +150,7 @@ def test_validate_no_adpapter_class_present(self):
serializer.is_valid()
self.assertDictEqual(serializer.errors, self.NO_ADAPTER_CLASS_PRESENT)

@patch('allauth.socialaccount.providers.facebook.views.fb_complete_login')
@patch('allauth.socialaccount.providers.facebook.flows.complete_login')
@patch('allauth.socialaccount.adapter.DefaultSocialAccountAdapter.pre_social_login')
def test_immediate_http_response_error(self, mock_pre_social_login, mock_fb_complete_login):
dummy_view = SocialLoginView()
Expand Down
Loading