Replaces uuid.uuid4 with uuidutils.generate_uuid()
Change-Id: I38740842402841ae446603faacbbe969854f2396 Closes-Bug: #1082248
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import uuid
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
import freezegun
|
||||
import mock
|
||||
@@ -73,7 +73,7 @@ class TestPurgeCommand(base.DbTestCase):
|
||||
seed += 1
|
||||
|
||||
def generate_unique_name(self, prefix):
|
||||
return "%s%s" % (prefix, uuid.uuid4())
|
||||
return "%s%s" % (prefix, uuidutils.generate_uuid())
|
||||
|
||||
def _data_setup(self):
|
||||
# All the 1's are soft_deleted and are expired
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
import uuid
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from watcher.decision_engine.model import element
|
||||
from watcher.tests import base
|
||||
@@ -95,7 +95,7 @@ class TestMapping(base.TestCase):
|
||||
instances = model.get_all_instances()
|
||||
keys = list(instances.keys())
|
||||
instance0 = instances[keys[0]]
|
||||
uuid_ = "{0}".format(uuid.uuid4())
|
||||
uuid_ = uuidutils.generate_uuid()
|
||||
node = element.ComputeNode(id=1)
|
||||
node.uuid = uuid_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user