From 12d38103f3ad88374444cd7f0f1c6d0c2952057e Mon Sep 17 00:00:00 2001 From: qinchunhua Date: Fri, 18 Nov 2016 17:11:26 +0800 Subject: [PATCH] Use uuidutils instead of uuid.uuid4() Openstack common has a wrapper for generating uuids. We should only use that function when generating uuids for consistency. Change-Id: Iadd98fd145e7f0a37c953936feaf69bd3527000f Closes-Bug: #1082248 --- ironicclient/tests/unit/test_shell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ironicclient/tests/unit/test_shell.py b/ironicclient/tests/unit/test_shell.py index fe1bc0f76..398598447 100644 --- a/ironicclient/tests/unit/test_shell.py +++ b/ironicclient/tests/unit/test_shell.py @@ -12,12 +12,12 @@ import re import sys -import uuid import fixtures from keystoneauth1 import exceptions as keystone_exc from keystoneauth1 import fixture as ks_fixture import mock +from oslo_utils import uuidutils import requests_mock import six import testtools @@ -259,7 +259,7 @@ class TestCase(testtools.TestCase): request_mocker.post( '%s/auth/tokens' % V3_URL, json=v3_token, - headers={'X-Subject-Token': uuid.uuid4().hex}) + headers={'X-Subject-Token': uuidutils.generate_uuid()}) def register_keystone_auth_fixture(self, request_mocker): self.register_keystone_v2_token_fixture(request_mocker)