forked from pool/python-PyKMIP
Accepting request 974884 from home:pgajdos:python
- do not require python-mock for build - added patches fix https://github.com/OpenKMIP/PyKMIP/issues/668 + python-PyKMIP-no-mock.patch OBS-URL: https://build.opensuse.org/request/show/974884 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyKMIP?expand=0&rev=12
This commit is contained in:
158
python-PyKMIP-no-mock.patch
Normal file
158
python-PyKMIP-no-mock.patch
Normal file
@@ -0,0 +1,158 @@
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/core/objects/test_credentials.py PyKMIP-0.10.0/kmip/tests/unit/core/objects/test_credentials.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/core/objects/test_credentials.py 2022-05-04 11:45:14.586835230 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/core/objects/test_credentials.py 2022-05-04 11:45:14.642835575 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import enum
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import testtools
|
||||
|
||||
from kmip import enums
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/core/test_config_helper.py PyKMIP-0.10.0/kmip/tests/unit/core/test_config_helper.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/core/test_config_helper.py 2022-05-04 11:45:14.586835230 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/core/test_config_helper.py 2022-05-04 11:45:14.622835452 +0200
|
||||
@@ -19,8 +19,8 @@ except ImportError:
|
||||
import ConfigParser as configparser
|
||||
|
||||
from testtools import TestCase
|
||||
-from mock import MagicMock
|
||||
-from mock import Mock
|
||||
+from unittest.mock import MagicMock
|
||||
+from unittest.mock import Mock
|
||||
|
||||
from kmip.core.config_helper import ConfigHelper
|
||||
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/pie/test_client.py PyKMIP-0.10.0/kmip/tests/unit/pie/test_client.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/pie/test_client.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/pie/test_client.py 2022-05-04 11:45:14.614835402 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import six
|
||||
import ssl
|
||||
import testtools
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/auth/test_slugs.py PyKMIP-0.10.0/kmip/tests/unit/services/server/auth/test_slugs.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/auth/test_slugs.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/auth/test_slugs.py 2022-05-04 11:45:14.618835427 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import requests
|
||||
import testtools
|
||||
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/auth/test_utils.py PyKMIP-0.10.0/kmip/tests/unit/services/server/auth/test_utils.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/auth/test_utils.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/auth/test_utils.py 2022-05-04 11:45:14.618835427 +0200
|
||||
@@ -19,7 +19,7 @@ from cryptography.hazmat.primitives impo
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
||||
import datetime
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import ssl
|
||||
import testtools
|
||||
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/crypto/test_engine.py PyKMIP-0.10.0/kmip/tests/unit/services/server/crypto/test_engine.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/crypto/test_engine.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/crypto/test_engine.py 2022-05-04 11:45:14.618835427 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
import testtools
|
||||
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_config.py PyKMIP-0.10.0/kmip/tests/unit/services/server/test_config.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_config.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/test_config.py 2022-05-04 11:45:14.618835427 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
import six
|
||||
from six.moves import configparser
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_engine.py PyKMIP-0.10.0/kmip/tests/unit/services/server/test_engine.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_engine.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/test_engine.py 2022-05-04 11:45:14.622835452 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import six
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import shutil
|
||||
import sqlalchemy
|
||||
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_monitor.py PyKMIP-0.10.0/kmip/tests/unit/services/server/test_monitor.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_monitor.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/test_monitor.py 2022-05-04 11:45:14.618835427 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import multiprocessing
|
||||
import os
|
||||
import shutil
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_server.py PyKMIP-0.10.0/kmip/tests/unit/services/server/test_server.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_server.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/test_server.py 2022-05-04 11:45:14.618835427 +0200
|
||||
@@ -18,7 +18,7 @@ import logging
|
||||
try:
|
||||
import unittest.mock as mock
|
||||
except Exception:
|
||||
- import mock
|
||||
+ from unittest import mock
|
||||
|
||||
import signal
|
||||
import socket
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_session.py PyKMIP-0.10.0/kmip/tests/unit/services/server/test_session.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/server/test_session.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/server/test_session.py 2022-05-04 11:45:14.618835427 +0200
|
||||
@@ -20,7 +20,7 @@ from cryptography.hazmat.primitives.asym
|
||||
|
||||
|
||||
import datetime
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import socket
|
||||
import testtools
|
||||
import time
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/test_kmip_client.py PyKMIP-0.10.0/kmip/tests/unit/services/test_kmip_client.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/test_kmip_client.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/test_kmip_client.py 2022-05-04 11:45:14.614835402 +0200
|
||||
@@ -66,7 +66,7 @@ from kmip.services.results import Operat
|
||||
from kmip.services.results import QueryResult
|
||||
from kmip.services.results import RekeyKeyPairResult
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import os
|
||||
import socket
|
||||
import ssl
|
||||
diff -upr PyKMIP-0.10.0.orig/kmip/tests/unit/services/test_kmip_protocol.py PyKMIP-0.10.0/kmip/tests/unit/services/test_kmip_protocol.py
|
||||
--- PyKMIP-0.10.0.orig/kmip/tests/unit/services/test_kmip_protocol.py 2022-05-04 11:45:14.582835205 +0200
|
||||
+++ PyKMIP-0.10.0/kmip/tests/unit/services/test_kmip_protocol.py 2022-05-04 11:45:14.614835402 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
-from mock import call, MagicMock
|
||||
+from unittest.mock import call, MagicMock
|
||||
from testtools import TestCase
|
||||
|
||||
import binascii
|
Reference in New Issue
Block a user