Debian Codegraph @

tests/apps/socialaccount/providers/agave/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.agave.provider import AgaveProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class AgaveTests(OAuth2TestsMixin, TestCase):
11 provider_id = AgaveProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "status": "success",
19 "message": "User details retrieved successfully.",
20 "version": "2.0.0-SNAPSHOT-rc3fad",
21 "result": {
22 "first_name": "John",
23 "last_name": "Doe",
24 "full_name": "John Doe",
25 "email": "[email protected]",
26 "phone": "",
27 "mobile_phone": "",
28 "status": "Active",
29 "create_time": "20180322043812Z",
30 "username": "jdoe"
31 }
32 }
33 """,
34 )
35
36 def get_expected_to_str(self):
37 return "jdoe"