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 4 commits into
base: master
Choose a base branch
from

Conversation

gekoke
Copy link

@gekoke gekoke commented Apr 27, 2024

Bumps tests to support django-allauth 0.62.1.

Also fixes some incidental test breakages that came with the version bump.

Fixes #626.

@pennersr
Copy link

@gekoke Can you also integrate the changes listed here? 0a20236 -- particularly the get_scope() poses any issue.

@gekoke
Copy link
Author

gekoke commented Apr 29, 2024

Done in 3342e05.

Where our changes diverge, I went with yours - that is:

modified   dj_rest_auth/tests/test_serializers.py
@@ -120,10 +120,7 @@ class TestSocialLoginSerializer(TestCase):
     def setUpTestData(cls):
         cls.request_data = {"access_token": "token1234"}
         cls.request = APIRequestFactory().post(cls.request_data, format='json')
-
-        middleware = SessionMiddleware(get_response=MagicMock())
-        middleware(cls.request)
-
+        cls.request.session = {}
         social_app = SocialApp.objects.create(
             provider='facebook',
             name='Facebook',
@@ -153,7 +150,7 @@ class TestSocialLoginSerializer(TestCase):
         serializer.is_valid()
         self.assertDictEqual(serializer.errors, self.NO_ADAPTER_CLASS_PRESENT)
 
-    @patch('allauth.socialaccount.providers.facebook.views.FacebookOAuth2Adapter.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()

All tests pass on 3342e05.

@pennersr
Copy link

pennersr commented May 2, 2024

@gekoke We also need this change: pennersr@4f6ca76 -- for the upcoming new allauth headless functionality several internals to which dj-rest-auth hooks up are changed.

@gekoke
Copy link
Author

gekoke commented May 2, 2024

@pennersr Done in 7eb2ec9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

erroneous imports leading to breakage in django-allauth 0.62.x
2 participants