Replaces uuid.uuid4 with uuidutils.generate_uuid()
Openstack common has a wrapper for generating uuids.We should use that function when generating uuids for consistency. Change-Id: Ifb450c91a1b91f016b4f9ad3a4367e8117b89a0d Closes-Bug: #1082248
This commit is contained in:
parent
58ee9d8ca2
commit
6704d5f8ba
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import itertools
|
import itertools
|
||||||
import uuid
|
|
||||||
|
|
||||||
import netaddr
|
import netaddr
|
||||||
from oslotest import base as test_base
|
from oslotest import base as test_base
|
||||||
|
@ -23,6 +22,7 @@ import six
|
||||||
import six.moves.xmlrpc_client as xmlrpclib
|
import six.moves.xmlrpc_client as xmlrpclib
|
||||||
|
|
||||||
from oslo_serialization import msgpackutils
|
from oslo_serialization import msgpackutils
|
||||||
|
from oslo_utils import uuidutils
|
||||||
|
|
||||||
|
|
||||||
_TZ_FMT = '%Y-%m-%d %H:%M:%S %Z%z'
|
_TZ_FMT = '%Y-%m-%d %H:%M:%S %Z%z'
|
||||||
|
@ -94,7 +94,7 @@ class MsgPackUtilsTest(test_base.BaseTestCase):
|
||||||
'b': 2.0,
|
'b': 2.0,
|
||||||
'c': [],
|
'c': [],
|
||||||
'd': set([1, 2, 3]),
|
'd': set([1, 2, 3]),
|
||||||
'zzz': uuid.uuid4(),
|
'zzz': uuidutils.generate_uuid(),
|
||||||
'yyy': 'yyy',
|
'yyy': 'yyy',
|
||||||
'ddd': b'bbb',
|
'ddd': b'bbb',
|
||||||
'today': datetime.date.today(),
|
'today': datetime.date.today(),
|
||||||
|
|
Loading…
Reference in New Issue