| 1 |
from http import HTTPStatus |
| 2 |
|
| 3 |
from django.test import TestCase |
| 4 |
|
| 5 |
from allauth.socialaccount.providers.jupyterhub.provider import JupyterHubProvider |
| 6 |
from tests.apps.socialaccount.base import OAuth2TestsMixin |
| 7 |
from tests.mocking import MockedResponse |
| 8 |
|
| 9 |
|
| 10 |
class JupyterHubTests(OAuth2TestsMixin, TestCase): |
| 11 |
provider_id = JupyterHubProvider.id |
| 12 |
|
| 13 |
def get_mocked_response(self): |
| 14 |
return MockedResponse( |
| 15 |
HTTPStatus.OK, |
| 16 |
""" |
| 17 |
{ |
| 18 |
"kind": "user", |
| 19 |
"name": "abc", |
| 20 |
"admin": false, |
| 21 |
"groups": [], |
| 22 |
"server": null, |
| 23 |
"pending": null, |
| 24 |
"created": "2016-12-06T18:30:50.297567Z", |
| 25 |
"last_activity": "2017-02-07T17:29:36.470236Z", |
| 26 |
"servers": null} |
| 27 |
""", |
| 28 |
) |
| 29 |
|
| 30 |
def get_expected_to_str(self): |
| 31 |
return "abc" |