Update compute API.get() stubs in test_serversV21

These old unit tests were stubbing out the DB API to
get an instance which is too low-level, and is now
replaced with stubbing out the compute API.get() method.

This is part of a larger series of changes to drop
pre-cellsv2 compatibility code in API.get().

Change-Id: I65f749d3600fb2e7ec0f3077312fa3812aa16496
This commit is contained in:
Matt Riedemann 2018-11-02 14:14:19 -04:00
parent f2fd72a31b
commit 033249da51
1 changed files with 3 additions and 3 deletions

View File

@ -3719,9 +3719,9 @@ class ServerStatusTest(test.TestCase):
self.controller = servers.ServersController()
def _get_with_state(self, vm_state, task_state=None):
self.stub_out('nova.db.api.instance_get_by_uuid',
fakes.fake_instance_get(vm_state=vm_state,
task_state=task_state))
self.stub_out('nova.compute.api.API.get',
fakes.fake_compute_get(vm_state=vm_state,
task_state=task_state))
request = fakes.HTTPRequestV21.blank('/fake/servers/%s' % FAKE_UUID)
return self.controller.show(request, FAKE_UUID)