Replace third party mock
... because now we do not support Python 2. Change-Id: I3d3ebad466ee0f17e8d6a80bdaa3cd8310f4dd74
This commit is contained in:
parent
53abb1b2f6
commit
b6f141aef5
|
@ -12,7 +12,6 @@ python-subunit>=0.0.18
|
||||||
oslotest>=1.2.0 # Apache-2.0
|
oslotest>=1.2.0 # Apache-2.0
|
||||||
stestr>=2.0.0 # Apache-2.0
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
mock>=2.0 # BSD
|
|
||||||
testtools>=0.9.36,!=1.2.0
|
testtools>=0.9.36,!=1.2.0
|
||||||
python-swiftclient>=3.1.0
|
python-swiftclient>=3.1.0
|
||||||
python-keystoneclient
|
python-keystoneclient
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
import mock
|
|
||||||
import json
|
import json
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from storlets.sbus import command as sbus_cmd
|
from storlets.sbus import command as sbus_cmd
|
||||||
from storlets.sbus.file_description import SBUS_FD_SERVICE_OUT
|
from storlets.sbus.file_description import SBUS_FD_SERVICE_OUT
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
# implied.
|
# implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
import mock
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from storlets.sbus import command as sbus_cmd
|
from storlets.sbus import command as sbus_cmd
|
||||||
from storlets.agent.daemon.server import StorletDaemon, StorletDaemonLoadError
|
from storlets.agent.daemon.server import StorletDaemon, StorletDaemonLoadError
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
import errno
|
import errno
|
||||||
import mock
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from storlets.sbus import command as sbus_cmd
|
from storlets.sbus import command as sbus_cmd
|
||||||
from storlets.sbus.client import SBusResponse
|
from storlets.sbus.client import SBusResponse
|
||||||
|
|
|
@ -14,10 +14,11 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
import mock
|
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from storlets.gateway.common.stob import FileDescriptorIterator
|
from storlets.gateway.common.stob import FileDescriptorIterator
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,16 +13,15 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
import eventlet
|
||||||
|
from io import BytesIO, StringIO
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
from shutil import rmtree
|
from shutil import rmtree
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
import eventlet
|
|
||||||
import json
|
|
||||||
from io import BytesIO, StringIO
|
|
||||||
|
|
||||||
import mock
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from swift.common.swob import Request, Response
|
from swift.common.swob import Request, Response
|
||||||
from swift.common.utils import FileLikeIter
|
from swift.common.utils import FileLikeIter
|
||||||
|
|
|
@ -13,19 +13,19 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
import os
|
|
||||||
import unittest
|
|
||||||
import tempfile
|
|
||||||
import errno
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
import errno
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
import os
|
||||||
from stat import ST_MODE
|
from stat import ST_MODE
|
||||||
|
import tempfile
|
||||||
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import docker.client
|
import docker.client
|
||||||
import docker.errors
|
import docker.errors
|
||||||
import docker.models.containers
|
import docker.models.containers
|
||||||
|
|
||||||
|
|
||||||
from storlets.sbus.client import SBusResponse
|
from storlets.sbus.client import SBusResponse
|
||||||
from storlets.sbus.client.exceptions import SBusClientIOError, \
|
from storlets.sbus.client.exceptions import SBusClientIOError, \
|
||||||
SBusClientMalformedResponse, SBusClientSendError
|
SBusClientMalformedResponse, SBusClientSendError
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from contextlib import contextmanager
|
||||||
|
import errno
|
||||||
import json
|
import json
|
||||||
import mock
|
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
import errno
|
from unittest import mock
|
||||||
from contextlib import contextmanager
|
|
||||||
|
|
||||||
from storlets.sbus.client.exceptions import SBusClientSendError, \
|
from storlets.sbus.client.exceptions import SBusClientSendError, \
|
||||||
SBusClientMalformedResponse
|
SBusClientMalformedResponse
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from storlets.gateway.gateways.stub import StorletGatewayStub
|
from storlets.gateway.gateways.stub import StorletGatewayStub
|
||||||
from storlets.swift_middleware import storlet_handler
|
from storlets.swift_middleware import storlet_handler
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
import unittest
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from swift.common.swob import Request
|
from swift.common.swob import Request
|
||||||
from storlets.gateway.common.exceptions import FileManagementError
|
from storlets.gateway.common.exceptions import FileManagementError
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from swift.common.swob import Request, HTTPOk, HTTPCreated
|
from swift.common.swob import Request, HTTPOk, HTTPCreated
|
||||||
from storlets.swift_middleware.handlers import StorletObjectHandler
|
from storlets.swift_middleware.handlers import StorletObjectHandler
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
import unittest
|
|
||||||
import itertools
|
import itertools
|
||||||
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from swift.common.swob import Request, HTTPOk, HTTPCreated, HTTPAccepted, \
|
from swift.common.swob import Request, HTTPOk, HTTPCreated, HTTPAccepted, \
|
||||||
|
|
|
@ -14,13 +14,14 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from IPython.core.error import UsageError
|
from IPython.core.error import UsageError
|
||||||
|
import itertools
|
||||||
from io import FileIO as file
|
from io import FileIO as file
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from storlets.tools.extensions.ipython import StorletMagics
|
|
||||||
import unittest
|
|
||||||
import mock
|
|
||||||
import os
|
import os
|
||||||
import itertools
|
import unittest
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
|
from storlets.tools.extensions.ipython import StorletMagics
|
||||||
|
|
||||||
|
|
||||||
class FakeConnection(object):
|
class FakeConnection(object):
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import mock
|
from unittest import mock
|
||||||
from storlets.tools.deploy_storlet import main
|
from storlets.tools.deploy_storlet import main
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue