From 736cf54adf3ee85d2f473e5e5374f9833422967c Mon Sep 17 00:00:00 2001 From: Samuel Merritt Date: Thu, 28 May 2015 15:30:47 -0700 Subject: [PATCH] Remove simplejson from tests Since we're dropping Python 2.6 support, we can rely on stdlib's json and get rid of our dependency on simplejson. This commit just takes simplejson out of the unit and functional tests. They still pass. Change-Id: I96f17df81fa5d265395a938b19213d2638682106 --- test/functional/test_object.py | 2 +- test/unit/common/middleware/test_list_endpoints.py | 3 ++- test/unit/common/test_direct_client.py | 3 ++- test/unit/proxy/controllers/test_info.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/functional/test_object.py b/test/functional/test_object.py index e74a7f63..4a62da1a 100755 --- a/test/functional/test_object.py +++ b/test/functional/test_object.py @@ -15,11 +15,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json import unittest from nose import SkipTest from uuid import uuid4 -from swift.common.utils import json from test.functional import check_response, retry, requires_acls, \ requires_policies diff --git a/test/unit/common/middleware/test_list_endpoints.py b/test/unit/common/middleware/test_list_endpoints.py index 3ec03795..2537d0ff 100644 --- a/test/unit/common/middleware/test_list_endpoints.py +++ b/test/unit/common/middleware/test_list_endpoints.py @@ -14,6 +14,7 @@ # limitations under the License. import array +import json import unittest from tempfile import mkdtemp from shutil import rmtree @@ -21,7 +22,7 @@ from shutil import rmtree import os import mock from swift.common import ring, utils -from swift.common.utils import json, split_path +from swift.common.utils import split_path from swift.common.swob import Request, Response from swift.common.middleware import list_endpoints from swift.common.storage_policy import StoragePolicy, POLICIES diff --git a/test/unit/common/test_direct_client.py b/test/unit/common/test_direct_client.py index 6f7660cd..145ac83c 100644 --- a/test/unit/common/test_direct_client.py +++ b/test/unit/common/test_direct_client.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json import unittest import os import urllib @@ -25,7 +26,7 @@ import mock from swift.common import direct_client from swift.common.exceptions import ClientException -from swift.common.utils import json, Timestamp +from swift.common.utils import Timestamp from swift.common.swob import HeaderKeyDict, RESPONSE_REASONS from swift.common.storage_policy import POLICIES diff --git a/test/unit/proxy/controllers/test_info.py b/test/unit/proxy/controllers/test_info.py index f33beba0..adf33296 100644 --- a/test/unit/proxy/controllers/test_info.py +++ b/test/unit/proxy/controllers/test_info.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json import unittest import time from mock import Mock @@ -20,7 +21,6 @@ from mock import Mock from swift.proxy.controllers import InfoController from swift.proxy.server import Application as ProxyApp from swift.common import utils -from swift.common.utils import json from swift.common.swob import Request, HTTPException