11
0
Files
python-django-oidc-provider/python-django-oidc-provider-no-mock.patch
John Vandenberg 9ca049d9db Accepting request 1145427 from home:mcalabkova:branches:devel:languages:python:django
- Update to 0.8.2
  * Added: Discovery endpoint response caching. Introducing OIDC_DISCOVERY_CACHE_ENABLE.
  * Fixed: ResponseType data migration.
  * Fixed: correctly verify PKCE secret in token endpoint.
  0.8.1
  * Changed: create_token and create_code are now methods on base classes to enable customization.
  * Changed: extract "is consent skip allowed" decision from the view to the endpoint.
  * Fixed: race condition in authorization code, parallel requests may reuse same token.
  0.8.0
  * Changed: now supporting latest versions of Django.
  * Changed: drop support for Python 2 and Django lower than 3.2.
  * Added: scope on token and introspection endpoints.
  * Changed: Use static instead of deprecated staticfiles template tag.
  * Fixed: example in docs for translatable scopes (ugettext).
- drop no-longer-needed django4.patch
- rebase python-django-oidc-provider-no-mock.patch

OBS-URL: https://build.opensuse.org/request/show/1145427
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-django-oidc-provider?expand=0&rev=14
2024-02-11 04:38:05 +00:00

89 lines
3.9 KiB
Diff

Index: django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_authorize_endpoint.py
===================================================================
--- django-oidc-provider-0.8.2.orig/oidc_provider/tests/cases/test_authorize_endpoint.py
+++ django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_authorize_endpoint.py
@@ -7,7 +7,8 @@ try:
except ImportError:
from urlparse import parse_qs, urlsplit
import uuid
-from mock import patch, mock
+from unittest import mock
+from unittest.mock import patch
from django.contrib.auth.models import AnonymousUser
from django.core.management import call_command
Index: django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_end_session_endpoint.py
===================================================================
--- django-oidc-provider-0.8.2.orig/oidc_provider/tests/cases/test_end_session_endpoint.py
+++ django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_end_session_endpoint.py
@@ -15,7 +15,7 @@ from oidc_provider.tests.app.utils impor
create_fake_client,
create_fake_user,
)
-import mock
+from unittest import mock
class EndSessionTestCase(TestCase):
Index: django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_introspection_endpoint.py
===================================================================
--- django-oidc-provider-0.8.2.orig/oidc_provider/tests/cases/test_introspection_endpoint.py
+++ django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_introspection_endpoint.py
@@ -1,7 +1,8 @@
import time
import random
-from mock import patch
+from unittest import mock
+from unittest.mock import patch
try:
from urllib.parse import urlencode
except ImportError:
Index: django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_middleware.py
===================================================================
--- django-oidc-provider-0.8.2.orig/oidc_provider/tests/cases/test_middleware.py
+++ django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_middleware.py
@@ -1,4 +1,4 @@
-import mock
+from unittest import mock
from django.urls import re_path
from django.test import TestCase, override_settings
Index: django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_token_endpoint.py
===================================================================
--- django-oidc-provider-0.8.2.orig/oidc_provider/tests/cases/test_token_endpoint.py
+++ django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_token_endpoint.py
@@ -27,7 +27,7 @@ from django.views.decorators.http import
from jwkest.jwk import KEYS
from jwkest.jws import JWS
from jwkest.jwt import JWT
-from mock import patch
+from unittest.mock import patch
from oidc_provider.lib.endpoints.introspection import INTROSPECTION_SCOPE
from oidc_provider.lib.utils.oauth2 import protected_resource_view
Index: django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_utils.py
===================================================================
--- django-oidc-provider-0.8.2.orig/oidc_provider/tests/cases/test_utils.py
+++ django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_utils.py
@@ -5,7 +5,7 @@ from hashlib import sha224
from django.http import HttpRequest
from django.test import TestCase, override_settings
from django.utils import timezone
-from mock import mock
+from unittest import mock
from oidc_provider.lib.utils.common import get_issuer, get_browser_state_or_default
from oidc_provider.lib.utils.token import create_token, create_id_token
Index: django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_provider_info_endpoint.py
===================================================================
--- django-oidc-provider-0.8.2.orig/oidc_provider/tests/cases/test_provider_info_endpoint.py
+++ django-oidc-provider-0.8.2/oidc_provider/tests/cases/test_provider_info_endpoint.py
@@ -1,4 +1,5 @@
-from mock import patch
+from unittest import mock
+from unittest.mock import patch
from django.core.cache import cache
try: