diff --git a/tests/test_command_helpers.py b/tests/test_command_helpers.py index 140e9154..af81601f 100644 --- a/tests/test_command_helpers.py +++ b/tests/test_command_helpers.py @@ -13,8 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +try: + from unittest import mock +except ImportError: + import mock + from six import StringIO -import mock import testtools from swiftclient import command_helpers as h diff --git a/tests/test_multithreading.py b/tests/test_multithreading.py index b5668378..81b07666 100644 --- a/tests/test_multithreading.py +++ b/tests/test_multithreading.py @@ -15,7 +15,12 @@ import sys import time -import mock + +try: + from unittest import mock +except ImportError: + import mock + import testtools import threading import six diff --git a/tests/test_swiftclient.py b/tests/test_swiftclient.py index 21fec10d..0667c108 100644 --- a/tests/test_swiftclient.py +++ b/tests/test_swiftclient.py @@ -14,8 +14,13 @@ # limitations under the License. # TODO: More tests -import mock import logging + +try: + from unittest import mock +except ImportError: + import mock + import six import socket import testtools