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 <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2019-08-16 17:14:28 +01:00
parent d888d9b8ed
commit aff95de32a
2 changed files with 1 additions and 5 deletions

View File

@ -25,7 +25,6 @@ import time
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 @@ class _IntegratedTestBase(test.TestCase):
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):

View File

@ -266,7 +266,7 @@ class ServersTest(ServersTestBase):
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)