From aff95de32a26b457b99b3e5a0de4ae35b25fa5f0 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 16 Aug 2019 17:14:28 +0100 Subject: [PATCH] functional: Remove 'get_invalid_image' This only had one caller and doesn't belong in a utility class. Change-Id: I8e163f9d08a4606b166c411e13aff2497142313c Signed-off-by: Stephen Finucane --- nova/tests/functional/integrated_helpers.py | 4 ---- nova/tests/functional/test_servers.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/nova/tests/functional/integrated_helpers.py b/nova/tests/functional/integrated_helpers.py index 595836b8f74..a50caeb7260 100644 --- a/nova/tests/functional/integrated_helpers.py +++ b/nova/tests/functional/integrated_helpers.py @@ -25,7 +25,6 @@ import os_traits from oslo_log import log as logging -from oslo_utils.fixture import uuidsentinel as uuids from nova.compute import instance_actions from nova.compute import utils as compute_utils @@ -316,9 +315,6 @@ def get_unused_flavor_name_id(self): return (generate_new_element(flavor_names, 'flavor'), int(generate_new_element(flavor_ids, '', True))) - def get_invalid_image(self): - return uuids.fake - def _build_minimal_create_server_request(self, name=None, image_uuid=None, flavor_id=None, networks=None, az=None, host=None): diff --git a/nova/tests/functional/test_servers.py b/nova/tests/functional/test_servers.py index 915b9a5f48e..7c56bf95fd6 100644 --- a/nova/tests/functional/test_servers.py +++ b/nova/tests/functional/test_servers.py @@ -266,7 +266,7 @@ def test_create_and_delete_server(self): self.api.post_server, post) # With an invalid imageRef, this throws 500. - server[self._image_ref_parameter] = self.get_invalid_image() + server[self._image_ref_parameter] = uuids.fake # TODO(justinsb): Check whatever the spec says should be thrown here self.assertRaises(client.OpenStackApiException, self.api.post_server, post)