Debian Codegraph @

tests/apps/socialaccount/providers/mailcow/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.mailcow.provider import MailcowProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class MailcowTests(OAuth2TestsMixin, TestCase):
11 provider_id = MailcowProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "success": true,
19 "username": "[email protected]",
20 "id": "[email protected]",
21 "identifier": "[email protected]",
22 "email": "[email protected]",
23 "full_name": "Test User",
24 "displayName": "Test User",
25 "created": "2021-12-15 14:35:54",
26 "modified": "2023-11-02 09:37:58",
27 "active": 1
28 }
29 """,
30 )
31
32 def get_expected_to_str(self):
33 return "[email protected]"