diff --git a/cinderclient/tests/functional/test_snapshot_create_cli.py b/cinderclient/tests/functional/test_snapshot_create_cli.py index ea3d9e6..7ef5dfd 100644 --- a/cinderclient/tests/functional/test_snapshot_create_cli.py +++ b/cinderclient/tests/functional/test_snapshot_create_cli.py @@ -10,6 +10,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. +import six from cinderclient.tests.functional import base @@ -42,10 +43,11 @@ class CinderSnapshotTests(base.ClientTestBase): 2) create snapshot with metadata 3) check that metadata complies entered """ - snapshot = self.object_create('snapshot', - params='--metadata test_metadata=test_date {0}'. - format(self.volume['id'])) - self.assertEqual("{u'test_metadata': u'test_date'}", + snapshot = self.object_create( + 'snapshot', + params='--metadata test_metadata=test_date {0}'.format( + self.volume['id'])) + self.assertEqual(six.text_type({u'test_metadata': u'test_date'}), snapshot['metadata']) self.object_delete('snapshot', snapshot['id']) self.check_object_deleted('snapshot', snapshot['id']) diff --git a/cinderclient/tests/functional/test_volume_create_cli.py b/cinderclient/tests/functional/test_volume_create_cli.py index 2795b78..da4d5fb 100644 --- a/cinderclient/tests/functional/test_volume_create_cli.py +++ b/cinderclient/tests/functional/test_volume_create_cli.py @@ -108,7 +108,7 @@ class CinderVolumeTestsWithParameters(base.ClientTestBase): 1) create volume with metadata 2) check that metadata complies entered """ - volume = self.object_create('volume', - params='--metadata test_metadata=test_date 1') - self.assertEqual("{u'test_metadata': u'test_date'}", + volume = self.object_create( + 'volume', params='--metadata test_metadata=test_date 1') + self.assertEqual(six.text_type({u'test_metadata': u'test_date'}), volume['metadata'])