Debian Codegraph @

tests/apps/socialaccount/providers/daum/tests.py

raw
1 import json
2 from http import HTTPStatus
3
4 from django.test import TestCase
5
6 from allauth.socialaccount.providers.daum.provider import DaumProvider
7 from tests.apps.socialaccount.base import OAuth2TestsMixin
8 from tests.mocking import MockedResponse
9
10
11 class DaumTests(OAuth2TestsMixin, TestCase):
12 provider_id = DaumProvider.id
13
14 def get_mocked_response(self):
15 result = {}
16 result["userid"] = "38DTh"
17 result["id"] = 46287445
18 result["nickname"] = "xncbf"
19 result["bigImagePath"] = "https://img1.daumcdn.net/thumb/"
20 result["openProfile"] = "https://img1.daumcdn.net/thumb/"
21 body = {}
22 body["code"] = HTTPStatus.OK
23 body["message"] = "OK"
24 body["result"] = result
25 return MockedResponse(HTTPStatus.OK, json.dumps(body))
26
27 def get_expected_to_str(self):
28 return "xncbf"