Debian Codegraph @

tests/apps/socialaccount/providers/asana/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.asana.provider import AsanaProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class AsanaTests(OAuth2TestsMixin, TestCase):
11 provider_id = AsanaProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {"data": {"photo": null, "workspaces": [{"id": 31337, "name": "example.com"},
18 {"id": 3133777, "name": "Personal Projects"}], "email": "[email protected]",
19 "name": "Test Name", "gid": 43748387}}""",
20 )
21
22 def get_expected_to_str(self):
23 return "[email protected]"