This commit is contained in:
Iliyan Angelov
2025-09-14 23:24:25 +03:00
commit c67067a2a4
71311 changed files with 6800714 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
"""Test MailChimp OAuth2 v3 Flow."""
from allauth.socialaccount.tests import OAuth2TestsMixin
from allauth.tests import MockedResponse, TestCase
from .provider import MailChimpProvider
class MailChimpTests(OAuth2TestsMixin, TestCase):
"""Test Class for MailChimp OAuth2 v3."""
provider_id = MailChimpProvider.id
def get_mocked_response(self):
"""Test authentication with an non-null avatar."""
return MockedResponse(
200,
"""{
"dc": "usX",
"role": "owner",
"accountname": "Name can have spaces",
"user_id": "99999999",
"login": {
"email": "test@example.com",
"avatar": "http://gallery.mailchimp.com/1a1a/avatar/2a2a.png",
"login_id": "88888888",
"login_name": "test@example.com",
"login_email": "test@example.com"
},
"login_url": "https://login.mailchimp.com",
"api_endpoint": "https://usX.api.mailchimp.com"
}""",
)