From: Anh Tran Date: Fri, 27 May 2016 02:21:51 +0000 (+0700) Subject: Stop using mox stubs in test_snapshots.py X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3be6e8d0ac17338b384b6bef6345a5db80aab151;p=osstest%2Fopenstack-nova.git Stop using mox stubs in test_snapshots.py Replace 'stubs.Set' with 'stub_out' in nova/tests/unit/api/openstack/compute/test_snapshots.py Part of blueprint remove-mox-ocata Change-Id: I7ca758dcb451a07f2f2d608e7c5ea9423a7a7cf1 --- diff --git a/nova/tests/unit/api/openstack/compute/test_snapshots.py b/nova/tests/unit/api/openstack/compute/test_snapshots.py index 8cdc7b6858..4bf614b49b 100644 --- a/nova/tests/unit/api/openstack/compute/test_snapshots.py +++ b/nova/tests/unit/api/openstack/compute/test_snapshots.py @@ -32,16 +32,17 @@ class SnapshotApiTestV21(test.NoDBTestCase): def setUp(self): super(SnapshotApiTestV21, self).setUp() fakes.stub_out_networking(self) - self.stubs.Set(cinder.API, "create_snapshot", - fakes.stub_snapshot_create) - self.stubs.Set(cinder.API, "create_snapshot_force", - fakes.stub_snapshot_create) - self.stubs.Set(cinder.API, "delete_snapshot", - fakes.stub_snapshot_delete) - self.stubs.Set(cinder.API, "get_snapshot", fakes.stub_snapshot_get) - self.stubs.Set(cinder.API, "get_all_snapshots", - fakes.stub_snapshot_get_all) - self.stubs.Set(cinder.API, "get", fakes.stub_volume_get) + self.stub_out("nova.volume.cinder.API.create_snapshot", + fakes.stub_snapshot_create) + self.stub_out("nova.volume.cinder.API.create_snapshot_force", + fakes.stub_snapshot_create) + self.stub_out("nova.volume.cinder.API.delete_snapshot", + fakes.stub_snapshot_delete) + self.stub_out("nova.volume.cinder.API.get_snapshot", + fakes.stub_snapshot_get) + self.stub_out("nova.volume.cinder.API.get_all_snapshots", + fakes.stub_snapshot_get_all) + self.stub_out("nova.volume.cinder.API.get", fakes.stub_volume_get) self.req = fakes.HTTPRequest.blank('') def _test_snapshot_create(self, force):