Debian Codegraph @

tests/apps/socialaccount/providers/windowslive/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.windowslive.provider import WindowsLiveProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class WindowsLiveTests(OAuth2TestsMixin, TestCase):
11 provider_id = WindowsLiveProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "first_name": "James",
19 "last_name": "Smith",
20 "name": "James Smith",
21 "locale": "en_US",
22 "gender": null,
23 "emails": {
24 "personal": null,
25 "account": "[email protected]",
26 "business": null,
27 "preferred": "[email protected]"
28 },
29 "link": "https://profile.live.com/",
30 "updated_time": "2014-02-07T00:35:27+0000",
31 "id": "83605e110af6ff98"
32 }
33 """,
34 )
35
36 def get_expected_to_str(self):
37 return "[email protected]"