Debian Codegraph @

tests/apps/socialaccount/providers/baidu/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.baidu.provider import BaiduProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class BaiduTests(OAuth2TestsMixin, TestCase):
11 provider_id = BaiduProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {"portrait": "78c0e9839de59bbde7859ccf43",
18 "uname": "\u90dd\u56fd\u715c", "uid": "3225892368"}""",
19 )
20
21 def get_expected_to_str(self):
22 return "\u90dd\u56fd\u715c"