Update compute API.get() stubs in test_access_ips

These old tests were stubbing the DB API to get an
instance which is too low-level. This changes the
stub to be on the compute API.get() method.

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

Change-Id: I6a8629bf06492a4b57f8951fdb8c61db9681adde
This commit is contained in:
Matt Riedemann 2018-11-02 17:23:16 -04:00
parent 9eb7be2386
commit e4fb870ab7
1 changed files with 3 additions and 2 deletions

View File

@ -38,8 +38,9 @@ class AccessIPsAPIValidationTestV21(test.TestCase):
fakes.stub_out_nw_api(self)
self._set_up_controller()
fake.stub_out_image_service(self)
self.stub_out('nova.db.api.instance_get_by_uuid',
fakes.fake_instance_get())
self.stub_out('nova.compute.api.API.get',
# This project_id matches fakes.HTTPRequest.blank.
fakes.fake_compute_get(project_id='fake'))
self.stub_out('nova.objects.instance.Instance.save', fake_save)
self.stub_out('nova.compute.api.API.rebuild', fake_rebuild)