Debian Codegraph @

tests/apps/socialaccount/providers/wahoo/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.wahoo.provider import WahooProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class WahooTests(OAuth2TestsMixin, TestCase):
11 provider_id = WahooProvider.id
12
13 def get_mocked_response(self):
14 # https://cloud-api.wahooligan.com/#users
15 return MockedResponse(
16 HTTPStatus.OK,
17 """
18 {
19 "id": 60462,
20 "height": "2.0",
21 "weight": "80.0",
22 "first": "Bob",
23 "last": "Smith",
24 "email": "[email protected]",
25 "birth": "1980-10-02",
26 "gender": 1,
27 "created_at": "2018-10-23T15:38:23.000Z",
28 "updated_at": "2018-10-24T20:46:40.000Z"
29 }
30 """,
31 )
32
33 def get_expected_to_str(self):
34 return "[email protected]"