summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-04-05 09:46:04 +0000
committerGerrit Code Review <review@openstack.org>2014-04-05 09:46:04 +0000
commitc5cc2b7b7e90edfa41d35ccf1dac13e0f7ac2da0 (patch)
tree773ad6276b59942bc484caa88a8d2746365906ad
parent1eaf4c549fd30d831aca11e05eeddbfb77ac3388 (diff)
parent4e7bc75432d366eb32190d8a9e9582be564fbace (diff)
downloadpython-swiftclient-c5cc2b7b7e90edfa41d35ccf1dac13e0f7ac2da0.tar.gz
Merge "Use the standard library's copy of mock when it's available."
-rw-r--r--tests/test_command_helpers.py6
-rw-r--r--tests/test_multithreading.py7
-rw-r--r--tests/test_swiftclient.py7
3 files changed, 17 insertions, 3 deletions
diff --git a/tests/test_command_helpers.py b/tests/test_command_helpers.py
index 140e915..af81601 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 b566837..81b0766 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 d5e1e09..80f074c 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