summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorZhongyue Luo <zhongyue.nah@intel.com>2013-06-10 14:43:41 +0800
committerZhongyue Luo <zhongyue.nah@intel.com>2013-06-11 13:28:29 +0900
commitab1977af316eef5375c7aaefdf364548b4fb5289 (patch)
treeabdded324a0220e9b17b78e5dc5c18c94b1f2b2d /nova/tests
parentf85e4ec079283f4217415b4fd6a37ced189bc49a (diff)
Replace functions in utils with oslo.fileutils
The following functions have moved to oslo. remove_path_on_error file_open delete_if_exists Replaced/removed overlapping functions with the ones in fileutils Change-Id: I41a19d76a777b6f899843bb0cc0582630accbd5c
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_configdrive2.py5
-rw-r--r--nova/tests/virt/libvirt/test_libvirt.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/nova/tests/test_configdrive2.py b/nova/tests/test_configdrive2.py
index a71a01f8f..490edc4ed 100644
--- a/nova/tests/test_configdrive2.py
+++ b/nova/tests/test_configdrive2.py
@@ -22,6 +22,7 @@ import tempfile
from nova import test
+from nova.openstack.common import fileutils
from nova import utils
from nova.virt import configdrive
@@ -53,7 +54,7 @@ class ConfigDriveTestCase(test.TestCase):
finally:
if imagefile:
- utils.delete_if_exists(imagefile)
+ fileutils.delete_if_exists(imagefile)
def test_create_configdrive_vfat(self):
imagefile = None
@@ -87,4 +88,4 @@ class ConfigDriveTestCase(test.TestCase):
finally:
if imagefile:
- utils.delete_if_exists(imagefile)
+ fileutils.delete_if_exists(imagefile)
diff --git a/nova/tests/virt/libvirt/test_libvirt.py b/nova/tests/virt/libvirt/test_libvirt.py
index 2f5f9c857..b6f2a3d8a 100644
--- a/nova/tests/virt/libvirt/test_libvirt.py
+++ b/nova/tests/virt/libvirt/test_libvirt.py
@@ -4745,7 +4745,7 @@ disk size: 4.4M''', ''))
self.stubs.Set(os, 'unlink', fake_unlink)
self.stubs.Set(images, 'fetch', lambda *_: None)
self.stubs.Set(images, 'qemu_img_info', fake_qemu_img_info)
- self.stubs.Set(utils, 'delete_if_exists', fake_rm_on_errror)
+ self.stubs.Set(fileutils, 'delete_if_exists', fake_rm_on_errror)
context = 'opaque context'
image_id = '4'