summaryrefslogtreecommitdiff
path: root/tests/unittests/helpers.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-03-19 08:22:30 -0400
committerScott Moser <smoser@ubuntu.com>2013-03-19 08:22:30 -0400
commita904de054f7818137c864e0f3ff728b3764cf457 (patch)
treee28f4807469f2c39554d4353bf11685c03a1b4aa /tests/unittests/helpers.py
parent204e79b93c882e17df63b24f7f682c0dbefb482d (diff)
parentae0f94c8f39a234d73ab8e2caf24d73439c8b5ee (diff)
downloadvyos-cloud-init-a904de054f7818137c864e0f3ff728b3764cf457.tar.gz
vyos-cloud-init-a904de054f7818137c864e0f3ff728b3764cf457.zip
merge from trunk at revno 799
Diffstat (limited to 'tests/unittests/helpers.py')
-rw-r--r--tests/unittests/helpers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py
index 91a50e18..e020a3ec 100644
--- a/tests/unittests/helpers.py
+++ b/tests/unittests/helpers.py
@@ -175,6 +175,7 @@ class FilesystemMockingTestCase(ResourceUsingTestCase):
def patchOS(self, new_root):
patch_funcs = {
os.path: ['isfile', 'exists', 'islink', 'isdir'],
+ os: ['listdir'],
}
for (mod, funcs) in patch_funcs.items():
for f in funcs:
@@ -183,6 +184,7 @@ class FilesystemMockingTestCase(ResourceUsingTestCase):
setattr(mod, f, trap_func)
self.patched_funcs.append((mod, f, func))
+
def populate_dir(path, files):
os.makedirs(path)
for (name, content) in files.iteritems():