diff --git a/tempest/api/compute/servers/test_device_tagging.py b/tempest/api/compute/servers/test_device_tagging.py index d40f937d0e..e8175873e9 100644 --- a/tempest/api/compute/servers/test_device_tagging.py +++ b/tempest/api/compute/servers/test_device_tagging.py @@ -12,9 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -import json - from oslo_log import log as logging +from oslo_serialization import jsonutils as json from tempest.api.compute import base from tempest.common import utils diff --git a/tempest/cmd/subunit_describe_calls.py b/tempest/cmd/subunit_describe_calls.py index 8dcf575ae6..081fa7a635 100644 --- a/tempest/cmd/subunit_describe_calls.py +++ b/tempest/cmd/subunit_describe_calls.py @@ -78,11 +78,11 @@ Output file JSON structure import argparse import collections import io -import json import os import re import sys +from oslo_serialization import jsonutils as json import subunit import testtools diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py index 1671216354..02bc6927ae 100644 --- a/tempest/scenario/test_server_basic_ops.py +++ b/tempest/scenario/test_server_basic_ops.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import json +from oslo_serialization import jsonutils as json from tempest.common import utils from tempest.common import waiters diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py index 3bc5b0b950..e5730e7c7d 100644 --- a/tempest/scenario/test_volume_boot_pattern.py +++ b/tempest/scenario/test_volume_boot_pattern.py @@ -11,7 +11,7 @@ # under the License. from oslo_log import log as logging -from oslo_serialization import jsonutils +from oslo_serialization import jsonutils as json import testtools from tempest.common import utils @@ -265,7 +265,7 @@ class TestVolumeBootPattern(manager.EncryptionScenarioTest): bdms = image.get('block_device_mapping') if not bdms: bdms = image['properties']['block_device_mapping'] - bdms = jsonutils.loads(bdms) + bdms = json.loads(bdms) snapshot_id = bdms[0]['snapshot_id'] self._delete_snapshot(snapshot_id) diff --git a/tempest/tests/lib/common/test_rest_client.py b/tempest/tests/lib/common/test_rest_client.py index 4c0bb57059..b8615824ad 100644 --- a/tempest/tests/lib/common/test_rest_client.py +++ b/tempest/tests/lib/common/test_rest_client.py @@ -13,10 +13,10 @@ # under the License. import copy -import json import fixtures import jsonschema +from oslo_serialization import jsonutils as json import six from tempest.lib.common import http diff --git a/tempest/tests/lib/services/identity/v2/test_token_client.py b/tempest/tests/lib/services/identity/v2/test_token_client.py index dfce9b37b0..a592ada4e6 100644 --- a/tempest/tests/lib/services/identity/v2/test_token_client.py +++ b/tempest/tests/lib/services/identity/v2/test_token_client.py @@ -12,9 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -import json - import mock +from oslo_serialization import jsonutils as json from tempest.lib.common import rest_client from tempest.lib import exceptions diff --git a/tempest/tests/lib/services/identity/v3/test_token_client.py b/tempest/tests/lib/services/identity/v3/test_token_client.py index 38e8c4a4ed..a9c58dfe97 100644 --- a/tempest/tests/lib/services/identity/v3/test_token_client.py +++ b/tempest/tests/lib/services/identity/v3/test_token_client.py @@ -12,9 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -import json - import mock +from oslo_serialization import jsonutils as json from tempest.lib.common import rest_client from tempest.lib import exceptions