Debian Codegraph @

tests/apps/socialaccount/providers/paypal/tests.py

raw
1 from http import HTTPStatus
2
3 from django.test import TestCase
4
5 from allauth.socialaccount.providers.paypal.provider import PaypalProvider
6 from tests.apps.socialaccount.base import OAuth2TestsMixin
7 from tests.mocking import MockedResponse
8
9
10 class PaypalTests(OAuth2TestsMixin, TestCase):
11 provider_id = PaypalProvider.id
12
13 def get_mocked_response(self):
14 return MockedResponse(
15 HTTPStatus.OK,
16 """
17 {
18 "user_id":
19 "https://www.paypal.com/webapps/auth/server/64ghr894040044",
20 "name": "Jane Doe",
21 "given_name": "Jane",
22 "family_name": "Doe",
23 "email": "[email protected]"
24 }
25 """,
26 )
27
28 def get_expected_to_str(self):
29 return "[email protected]"