Merge "Remove unnecessary generating uuid function"
This commit is contained in:
commit
62a3484735
@ -23,7 +23,6 @@ import time
|
||||
from oslo_context import context as common_context
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import loopingcall
|
||||
from oslo_utils import uuidutils
|
||||
import pecan
|
||||
import six
|
||||
|
||||
@ -72,10 +71,6 @@ def allow_all_content_types(f):
|
||||
return _do_allow_certain_content_types(f, mimetypes.types_map.values())
|
||||
|
||||
|
||||
def generate_uuid():
|
||||
return uuidutils.generate_uuid()
|
||||
|
||||
|
||||
def parse_image_name(image):
|
||||
image_parts = image.split(':', 1)
|
||||
|
||||
|
@ -14,7 +14,8 @@ import mock
|
||||
from mock import patch
|
||||
from webtest.app import AppError
|
||||
|
||||
from zun.common import utils as comm_utils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from zun import objects
|
||||
from zun.objects import fields
|
||||
from zun.tests.unit.api import base as api_base
|
||||
@ -264,7 +265,7 @@ class TestContainerController(api_base.FunctionalTest):
|
||||
container_list = []
|
||||
for id_ in range(4):
|
||||
test_container = utils.create_test_container(
|
||||
id=id_, uuid=comm_utils.generate_uuid(),
|
||||
id=id_, uuid=uuidutils.generate_uuid(),
|
||||
name='container' + str(id_), context=self.context)
|
||||
container_list.append(objects.Container(self.context,
|
||||
**test_container))
|
||||
|
@ -14,7 +14,8 @@ import mock
|
||||
from mock import patch
|
||||
from webtest.app import AppError
|
||||
|
||||
from zun.common import utils as comm_utils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from zun import objects
|
||||
from zun.tests.unit.api import base as api_base
|
||||
from zun.tests.unit.db import utils
|
||||
@ -119,7 +120,7 @@ class TestImageController(api_base.FunctionalTest):
|
||||
test_image = utils.create_test_image(
|
||||
id=id_,
|
||||
repo='testrepo' + str(id_),
|
||||
uuid=comm_utils.generate_uuid())
|
||||
uuid=uuidutils.generate_uuid())
|
||||
image_list.append(objects.Image(self.context, **test_image))
|
||||
mock_image_list.return_value = image_list[-1:]
|
||||
mock_image_show.return_value = image_list[-1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user