summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorMichael Still <mikal@stillhq.com>2013-01-13 09:27:48 +1100
committerMichael Still <mikal@stillhq.com>2013-01-13 09:27:48 +1100
commit2f4616c2be4fb03864c74cdbb1d1ec9b2bdbf235 (patch)
treef079ef4c509dd8ad2d7d4586c1b3b443cad0bd20 /nova/tests
parent3a59dcfa70f7bed55de595bff325f738d463bf4c (diff)
Convert ConfigDriveHelper to being a context manager itself.
This is a little bit less awkward than the previous implementation, and is based on a suggestion from Padraig Brady. Change-Id: If8b09a41d21777a4bd56af16e1f7e02d61d1dd4e
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_configdrive2.py4
-rw-r--r--nova/tests/test_virt_drivers.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/test_configdrive2.py b/nova/tests/test_configdrive2.py
index 91c2a4e5e..260ab28c7 100644
--- a/nova/tests/test_configdrive2.py
+++ b/nova/tests/test_configdrive2.py
@@ -45,7 +45,7 @@ class ConfigDriveTestCase(test.TestCase):
self.mox.ReplayAll()
- with configdrive.config_drive_helper() as c:
+ with configdrive.ConfigDriveBuilder() as c:
c._add_file('this/is/a/path/hello', 'This is some content')
(fd, imagefile) = tempfile.mkstemp(prefix='cd_iso_')
os.close(fd)
@@ -77,7 +77,7 @@ class ConfigDriveTestCase(test.TestCase):
self.mox.ReplayAll()
- with configdrive.config_drive_helper() as c:
+ with configdrive.ConfigDriveBuilder() as c:
c._add_file('this/is/a/path/hello', 'This is some content')
(fd, imagefile) = tempfile.mkstemp(prefix='cd_vfat_')
os.close(fd)
diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py
index 9e9309dfe..199ae30b1 100644
--- a/nova/tests/test_virt_drivers.py
+++ b/nova/tests/test_virt_drivers.py
@@ -114,7 +114,7 @@ class _FakeDriverBackendTestCase(object):
# We can't actually make a config drive v2 because ensure_tree has
# been faked out
- self.stubs.Set(nova.virt.configdrive._ConfigDriveBuilder,
+ self.stubs.Set(nova.virt.configdrive.ConfigDriveBuilder,
'make_drive', fake_make_drive)
def _teardown_fakelibvirt(self):