Debian Codegraph @

tests/apps/socialaccount/providers/netiq/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.netiq.provider import NetIQProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class NetIQTests(OAuth2TestsMixin, TestCase):
11 provider_id = NetIQProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "sub": "d4c094dd899ab0408fb9d4c094dd899a",
19 "acr": "secure/name/password/uri",
20 "preferred_username": "Mocktest",
21 "email": "[email protected]",
22 "nickname": "Mocktest",
23 "family_name": "test",
24 "given_name": "Mock",
25 "website": "https://www.exanple.com"
26 }
27 """,
28 )
29
30 def get_expected_to_str(self):
31 return "[email protected]"