diff options
| author | Michael Still <mikal@stillhq.com> | 2012-08-27 13:17:36 +1000 |
|---|---|---|
| committer | Michael Still <mikal@stillhq.com> | 2012-08-28 07:58:18 +1000 |
| commit | a73334b47a88e6b1c0f33db5312edd49d50c097b (patch) | |
| tree | 5fe9e546cf787e7017891de393feb314291da027 /nova/tests | |
| parent | 0d1e9ef251ce91d72d9671c5b4c8c02c87205d3a (diff) | |
Port existing code to utils.ensure_tree
Now that we have ensure_tree in utils, port most users of
os.makedirs() to use it.
Change-Id: I3256cbb76bd889f99f1e6f3367bd620645f828a1
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/network/test_linux_net.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/nova/tests/network/test_linux_net.py b/nova/tests/network/test_linux_net.py index 47b853a8a..fd6708343 100644 --- a/nova/tests/network/test_linux_net.py +++ b/nova/tests/network/test_linux_net.py @@ -236,18 +236,18 @@ class LinuxNetworkTestCase(test.TestCase): self.flags(use_single_default_gateway=True) self.mox.StubOutWithMock(self.driver, 'write_to_file') - self.mox.StubOutWithMock(self.driver, 'ensure_path') + self.mox.StubOutWithMock(utils, 'ensure_tree') self.mox.StubOutWithMock(os, 'chmod') self.driver.write_to_file(mox.IgnoreArg(), mox.IgnoreArg()) self.driver.write_to_file(mox.IgnoreArg(), mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) os.chmod(mox.IgnoreArg(), mox.IgnoreArg()) os.chmod(mox.IgnoreArg(), mox.IgnoreArg()) @@ -259,18 +259,18 @@ class LinuxNetworkTestCase(test.TestCase): self.flags(use_single_default_gateway=True) self.mox.StubOutWithMock(self.driver, 'write_to_file') - self.mox.StubOutWithMock(self.driver, 'ensure_path') + self.mox.StubOutWithMock(utils, 'ensure_tree') self.mox.StubOutWithMock(os, 'chmod') self.driver.write_to_file(mox.IgnoreArg(), mox.IgnoreArg()) self.driver.write_to_file(mox.IgnoreArg(), mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) - self.driver.ensure_path(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) + utils.ensure_tree(mox.IgnoreArg()) os.chmod(mox.IgnoreArg(), mox.IgnoreArg()) os.chmod(mox.IgnoreArg(), mox.IgnoreArg()) |
