Replace third party mock

... because now we do not support Python 2.

Change-Id: I3d3ebad466ee0f17e8d6a80bdaa3cd8310f4dd74
This commit is contained in:
Takashi Kajinami 2022-06-26 23:47:50 +09:00
parent 53abb1b2f6
commit b6f141aef5
14 changed files with 30 additions and 30 deletions

View File

@ -12,7 +12,6 @@ python-subunit>=0.0.18
oslotest>=1.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4
mock>=2.0 # BSD
testtools>=0.9.36,!=1.2.0
python-swiftclient>=3.1.0
python-keystoneclient

View File

@ -12,9 +12,9 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import json
import unittest
from unittest import mock
from storlets.sbus import command as sbus_cmd
from storlets.sbus.file_description import SBUS_FD_SERVICE_OUT

View File

@ -12,8 +12,8 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest
from unittest import mock
from storlets.sbus import command as sbus_cmd
from storlets.agent.daemon.server import StorletDaemon, StorletDaemonLoadError

View File

@ -14,8 +14,8 @@
# limitations under the License.
from contextlib import contextmanager
import errno
import mock
import unittest
from unittest import mock
from storlets.sbus import command as sbus_cmd
from storlets.sbus.client import SBusResponse

View File

@ -14,10 +14,11 @@
# limitations under the License.
from contextlib import contextmanager
import mock
import os
import tempfile
import unittest
from unittest import mock
from storlets.gateway.common.stob import FileDescriptorIterator

View File

@ -13,16 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import eventlet
from io import BytesIO, StringIO
import json
import os
import os.path
from shutil import rmtree
from tempfile import mkdtemp
import eventlet
import json
from io import BytesIO, StringIO
import mock
import unittest
from unittest import mock
from swift.common.swob import Request, Response
from swift.common.utils import FileLikeIter

View File

@ -13,19 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import os
import unittest
import tempfile
import errno
from contextlib import contextmanager
import errno
from io import StringIO
import os
from stat import ST_MODE
import tempfile
import unittest
from unittest import mock
import docker.client
import docker.errors
import docker.models.containers
from storlets.sbus.client import SBusResponse
from storlets.sbus.client.exceptions import SBusClientIOError, \
SBusClientMalformedResponse, SBusClientSendError

View File

@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from contextlib import contextmanager
import errno
import json
import mock
import os
import unittest
import errno
from contextlib import contextmanager
from unittest import mock
from storlets.sbus.client.exceptions import SBusClientSendError, \
SBusClientMalformedResponse

View File

@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest
from unittest import mock
from storlets.gateway.gateways.stub import StorletGatewayStub
from storlets.swift_middleware import storlet_handler

View File

@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest
from contextlib import contextmanager
from io import StringIO
import unittest
from unittest import mock
from swift.common.swob import Request
from storlets.gateway.common.exceptions import FileManagementError

View File

@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest
from unittest import mock
from swift.common.swob import Request, HTTPOk, HTTPCreated
from storlets.swift_middleware.handlers import StorletObjectHandler

View File

@ -13,9 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest
import itertools
import unittest
from unittest import mock
from contextlib import contextmanager
from swift.common.swob import Request, HTTPOk, HTTPCreated, HTTPAccepted, \

View File

@ -14,13 +14,14 @@
# limitations under the License.
from IPython.core.error import UsageError
import itertools
from io import FileIO as file
from io import StringIO
from storlets.tools.extensions.ipython import StorletMagics
import unittest
import mock
import os
import itertools
import unittest
from unittest import mock
from storlets.tools.extensions.ipython import StorletMagics
class FakeConnection(object):

View File

@ -14,7 +14,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from storlets.tools.deploy_storlet import main