Skip to content

tests fail with django-allauth-socialaccount > 64

Allauth bumped from 0.63.x => 64.x and with it introduced typing which breaks one of the tests:

________________________________________________________________ SignalsTestCase.test_social_account_added _________________________________________________________________
django_mailman3/tests/test_signals.py:102: in test_social_account_added
    social_account_added.send(sender=User, sociallogin=sociallogin)
.tox/py312-django50/lib/python3.12/site-packages/django/dispatch/dispatcher.py:189: in send
    response = receiver(signal=self, sender=sender, **named)
django_mailman3/signals.py:175: in on_social_account_added
    sociallogin.account, sociallogin.user.username)
E   AttributeError: 'SocialLogin' object has no attribute 'account'

Broken by:

https://github.com/pennersr/django-allauth/commit/65a5d486489c1d8e75adef69daab21127e2f7bd1

This seems to be just a broken test on mailman's side. The test creates a SocialLogin without an account which now no longer returns None.

        sociallogin = SocialLogin(
            user=self.user, email_addresses=[verified, unverified])