Debian Codegraph @

tests/apps/socialaccount/providers/instagram/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.instagram.provider import InstagramProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class InstagramTests(OAuth2TestsMixin, TestCase):
11 provider_id = InstagramProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "username": "georgewhewell",
19 "bio": "",
20 "website": "",
21 "profile_picture":
22 "http://images.ak.instagram.com/profiles/profile_11428116_75sq_1339547159.jpg",
23 "full_name": "georgewhewell",
24 "counts": {
25 "media": 74,
26 "followed_by": 91,
27 "follows": 104
28 },
29 "id": "11428116"
30 }""",
31 ) # noqa
32
33 def get_expected_to_str(self):
34 return "georgewhewell"