Debian Codegraph @

tests/apps/socialaccount/providers/basecamp/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.basecamp.provider import BasecampProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class BasecampTests(OAuth2TestsMixin, TestCase):
11 provider_id = BasecampProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "expires_at": "2012-03-22T16:56:48-05:00",
19 "identity": {
20 "id": 9999999,
21 "first_name": "Jason Fried",
22 "last_name": "Jason Fried",
23 "email_address": "[email protected]"
24 },
25 "accounts": [
26 {
27 "product": "bcx",
28 "id": 88888888,
29 "name": "Wayne Enterprises, Ltd.",
30 "href": "https://basecamp.com/88888888/api/v1"
31 },
32 {
33 "product": "bcx",
34 "id": 77777777,
35 "name": "Veidt, Inc",
36 "href": "https://basecamp.com/77777777/api/v1"
37 },
38 {
39 "product": "campfire",
40 "id": 44444444,
41 "name": "Acme Shipping Co.",
42 "href": "https://acme4444444.campfirenow.com"
43 }
44 ]
45 }""",
46 )
47
48 def get_expected_to_str(self):
49 return "[email protected]"