| 1 |
from http import HTTPStatus |
| 2 |
|
| 3 |
from django.test import TestCase |
| 4 |
|
| 5 |
from allauth.socialaccount.providers.feedly.provider import FeedlyProvider |
| 6 |
from tests.apps.socialaccount.base import OAuth2TestsMixin |
| 7 |
from tests.mocking import MockedResponse |
| 8 |
|
| 9 |
|
| 10 |
class FeedlyTests(OAuth2TestsMixin, TestCase): |
| 11 |
provider_id = FeedlyProvider.id |
| 12 |
|
| 13 |
def get_mocked_response(self): |
| 14 |
return MockedResponse( |
| 15 |
HTTPStatus.OK, |
| 16 |
""" |
| 17 |
{ |
| 18 |
"id": "c805fcbf-3acf-4302-a97e-d82f9d7c897f", |
| 19 |
"email": "[email protected]", |
| 20 |
"givenName": "Jim", |
| 21 |
"familyName": "Smith", |
| 22 |
"picture": "https://www.google.com/profile_images/1771656873/bigger.jpg", |
| 23 |
"gender": "male", |
| 24 |
"locale": "en", |
| 25 |
"reader": "9080770707070700", |
| 26 |
"google": "115562565652656565656", |
| 27 |
"twitter": "jimsmith", |
| 28 |
"facebook": "", |
| 29 |
"wave": "2013.7" |
| 30 |
}""", |
| 31 |
) |
| 32 |
|
| 33 |
def get_expected_to_str(self): |
| 34 |
return "[email protected]" |