Debian Codegraph @

tests/apps/socialaccount/providers/cilogon/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.cilogon.provider import CILogonProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class CILogonTests(OAuth2TestsMixin, TestCase):
11 provider_id = CILogonProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "email": "[email protected]",
19 "eppn": "[email protected]",
20 "firstname": "John",
21 "lastname": "Doe",
22 "idp_name": "Example University",
23 "sub": "http://cilogon.org/serverA/users/1234567"
24 }""",
25 )
26
27 def get_expected_to_str(self):
28 return "[email protected]"