python-oauthlib/nomock-indirect.patch
Jakub Hrozek c851f859b8 Resolves: rhbz#1922352 - python-oauthlib requires python-mock
- Update to upstream 3.1.0
- Gets rid of obsolete python-nose dependency
- Nuke the python2/python3 conditionals, let's only support python3
2021-05-25 10:24:06 +02:00

163 lines
8.5 KiB
Diff

diff -up oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_access_token.py.mock_indirect oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_access_token.py
--- oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_access_token.py.mock_indirect 2021-05-10 12:43:55.343919797 +0200
+++ oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_access_token.py 2021-05-10 12:46:56.336475872 +0200
@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
-from mock import ANY, MagicMock
+from unittest.mock import ANY, MagicMock
from oauthlib.oauth1 import RequestValidator
from oauthlib.oauth1.rfc5849 import Client
diff -up oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_authorization.py.mock_indirect oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_authorization.py
--- oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_authorization.py.mock_indirect 2021-05-10 12:43:55.340919787 +0200
+++ oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_authorization.py 2021-05-10 12:46:53.640467589 +0200
@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
-from mock import MagicMock
+from unittest.mock import MagicMock
from oauthlib.oauth1 import RequestValidator
from oauthlib.oauth1.rfc5849 import errors
diff -up oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_base.py.mock_indirect oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_base.py
--- oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_base.py.mock_indirect 2021-05-10 12:43:55.347919809 +0200
+++ oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_base.py 2021-05-10 12:46:43.396436116 +0200
@@ -2,7 +2,7 @@ from __future__ import absolute_import,
from re import sub
-from mock import MagicMock
+from unittest.mock import MagicMock
from oauthlib.common import CaseInsensitiveDict, safe_string_equals
from oauthlib.oauth1 import Client, RequestValidator
diff -up oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_request_token.py.mock_indirect oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_request_token.py
--- oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_request_token.py.mock_indirect 2021-05-10 12:43:55.345919802 +0200
+++ oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_request_token.py 2021-05-10 12:46:59.010484087 +0200
@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
-from mock import ANY, MagicMock
+from unittest.mock import ANY, MagicMock
from oauthlib.oauth1 import RequestValidator
from oauthlib.oauth1.rfc5849 import Client
diff -up oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_resource.py.mock_indirect oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_resource.py
--- oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_resource.py.mock_indirect 2021-05-10 12:43:55.338919781 +0200
+++ oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_resource.py 2021-05-10 12:46:48.398451483 +0200
@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
-from mock import ANY, MagicMock
+from unittest.mock import ANY, MagicMock
from oauthlib.oauth1 import RequestValidator
from oauthlib.oauth1.rfc5849 import Client
diff -up oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_signature_only.py.mock_indirect oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_signature_only.py
--- oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_signature_only.py.mock_indirect 2021-05-10 12:43:55.342919793 +0200
+++ oauthlib-3.1.0/tests/oauth1/rfc5849/endpoints/test_signature_only.py 2021-05-10 12:46:50.956459343 +0200
@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
-from mock import ANY, MagicMock
+from unittest.mock import ANY, MagicMock
from oauthlib.oauth1 import RequestValidator
from oauthlib.oauth1.rfc5849 import Client
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_backend_application.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_backend_application.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_backend_application.py.mock_indirect 2021-05-10 12:43:55.326919744 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_backend_application.py 2021-05-10 12:47:06.771507932 +0200
@@ -3,7 +3,7 @@ from __future__ import absolute_import,
import os
-from mock import patch
+from unittest.mock import patch
from oauthlib import signals
from oauthlib.oauth2 import BackendApplicationClient
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_legacy_application.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_legacy_application.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_legacy_application.py.mock_indirect 2021-05-10 12:43:55.320919726 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_legacy_application.py 2021-05-10 12:48:21.082736247 +0200
@@ -3,7 +3,7 @@ from __future__ import absolute_import,
import os
-from mock import patch
+from unittest.mock import patch
from oauthlib import signals
from oauthlib.oauth2 import LegacyApplicationClient
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_mobile_application.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_mobile_application.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_mobile_application.py.mock_indirect 2021-05-10 12:43:55.328919750 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_mobile_application.py 2021-05-10 12:47:04.255500202 +0200
@@ -3,7 +3,7 @@ from __future__ import absolute_import,
import os
-from mock import patch
+from unittest.mock import patch
from oauthlib import signals
from oauthlib.oauth2 import MobileApplicationClient
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_service_application.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_service_application.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_service_application.py.mock_indirect 2021-05-10 12:43:55.323919735 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_service_application.py 2021-05-10 12:47:09.375515932 +0200
@@ -5,7 +5,7 @@ import os
from time import time
import jwt
-from mock import patch
+from unittest.mock import patch
from oauthlib.common import Request
from oauthlib.oauth2 import ServiceApplicationClient
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_web_application.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_web_application.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_web_application.py.mock_indirect 2021-05-10 12:43:55.330919757 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/clients/test_web_application.py 2021-05-10 12:47:01.696492340 +0200
@@ -5,7 +5,7 @@ import datetime
import os
import warnings
-from mock import patch
+from unittest.mock import patch
from oauthlib import common, signals
from oauthlib.oauth2 import (BackendApplicationClient, Client,
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py.mock_indirect 2021-05-10 12:43:55.336919775 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py 2021-05-10 12:48:12.888711068 +0200
@@ -3,7 +3,7 @@ from __future__ import absolute_import,
from json import loads
-from mock import MagicMock
+from unittest.mock import MagicMock
from oauthlib.common import urlencode
from oauthlib.oauth2 import RequestValidator, IntrospectEndpoint
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py.mock_indirect 2021-05-10 12:43:55.333919766 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/endpoints/test_revocation_endpoint.py 2021-05-10 12:48:10.078702435 +0200
@@ -3,7 +3,7 @@ from __future__ import absolute_import,
from json import loads
-from mock import MagicMock
+from unittest.mock import MagicMock
from oauthlib.common import urlencode
from oauthlib.oauth2 import RequestValidator, RevocationEndpoint
diff -up oauthlib-3.1.0/tests/oauth2/rfc6749/test_parameters.py.mock_indirect oauthlib-3.1.0/tests/oauth2/rfc6749/test_parameters.py
--- oauthlib-3.1.0/tests/oauth2/rfc6749/test_parameters.py.mock_indirect 2021-05-10 12:43:55.349919815 +0200
+++ oauthlib-3.1.0/tests/oauth2/rfc6749/test_parameters.py 2021-05-10 12:48:36.576783620 +0200
@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
-from mock import patch
+from unittest.mock import patch
from oauthlib import signals
from oauthlib.oauth2.rfc6749.errors import *