From 3be6e8d0ac17338b384b6bef6345a5db80aab151 Mon Sep 17 00:00:00 2001 From: Anh Tran Date: Fri, 27 May 2016 09:21:51 +0700 Subject: [PATCH] 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 --- .../api/openstack/compute/test_snapshots.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) 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): -- 2.39.5