From 59379eec8a3baf87ac1fe42e00f7942d9bdad328 Mon Sep 17 00:00:00 2001 From: XieYingYun Date: Sat, 1 Apr 2017 10:59:46 +0800 Subject: [PATCH] Remove unnecessary tearDown function in testcase In testcase, tearDown will be called automatically. This patch used to remove tearDown functions that do nothing. Besides, it will keep code clean Change-Id: I3a8977fb1ea035acd0da71233e184ed293619556 --- nova/tests/unit/virt/libvirt/storage/test_rbd.py | 3 --- nova/tests/unit/virt/libvirt/test_driver.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/nova/tests/unit/virt/libvirt/storage/test_rbd.py b/nova/tests/unit/virt/libvirt/storage/test_rbd.py index 4cb2488a53..7f738d87cf 100644 --- a/nova/tests/unit/virt/libvirt/storage/test_rbd.py +++ b/nova/tests/unit/virt/libvirt/storage/test_rbd.py @@ -86,9 +86,6 @@ class RbdTestCase(test.NoDBTestCase): self.volume_name = u'volume-00000001' self.snap_name = u'test-snap' - def tearDown(self): - super(RbdTestCase, self).tearDown() - @mock.patch.object(rbd_utils, 'rbd') def test_rbdproxy_wraps_rbd(self, mock_rbd): proxy = rbd_utils.RbdProxy() diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py index 7afff0e0b8..d8c73bd19a 100644 --- a/nova/tests/unit/virt/libvirt/test_driver.py +++ b/nova/tests/unit/virt/libvirt/test_driver.py @@ -17730,9 +17730,6 @@ class LibvirtVolumeSnapshotTestCase(test.NoDBTestCase): 'merge_target_file': 'some_other_file'} - def tearDown(self): - super(LibvirtVolumeSnapshotTestCase, self).tearDown() - @mock.patch('nova.virt.block_device.DriverVolumeBlockDevice.' 'refresh_connection_info') @mock.patch('nova.objects.block_device.BlockDeviceMapping.'