Files
GNX-mailEnterprise/venv/lib/python3.12/site-packages/allauth/socialaccount/providers/azure/tests.py
Iliyan Angelov c67067a2a4 Mail
2025-09-14 23:24:25 +03:00

24 lines
799 B
Python

from allauth.socialaccount.tests import OAuth2TestsMixin
from allauth.tests import MockedResponse, TestCase
from .provider import AzureProvider
class AzureTests(OAuth2TestsMixin, TestCase):
provider_id = AzureProvider.id
def get_mocked_response(self):
return MockedResponse(
200,
"""
{"displayName": "John Smith", "mobilePhone": null,
"preferredLanguage": "en-US", "jobTitle": "Director",
"userPrincipalName": "john@smith.com",
"@odata.context":
"https://graph.microsoft.com/v1.0/$metadata#users/$entity",
"officeLocation": "Paris", "businessPhones": [],
"mail": "john@smith.com", "surname": "Smith",
"givenName": "John", "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"}
""",
)