summaryrefslogtreecommitdiff
path: root/tests/unittests/test_runs/test_simple_run.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/test_runs/test_simple_run.py')
-rw-r--r--tests/unittests/test_runs/test_simple_run.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unittests/test_runs/test_simple_run.py b/tests/unittests/test_runs/test_simple_run.py
index d67c422c..cb3aae60 100644
--- a/tests/unittests/test_runs/test_simple_run.py
+++ b/tests/unittests/test_runs/test_simple_run.py
@@ -5,6 +5,7 @@ import os
from cloudinit.settings import PER_INSTANCE
+from cloudinit import safeyaml
from cloudinit import stages
from cloudinit.tests import helpers
from cloudinit import util
@@ -34,7 +35,7 @@ class TestSimpleRun(helpers.FilesystemMockingTestCase):
],
'cloud_init_modules': ['write-files', 'spacewalk', 'runcmd'],
}
- cloud_cfg = util.yaml_dumps(self.cfg)
+ cloud_cfg = safeyaml.dumps(self.cfg)
util.ensure_dir(os.path.join(self.new_root, 'etc', 'cloud'))
util.write_file(os.path.join(self.new_root, 'etc',
'cloud', 'cloud.cfg'), cloud_cfg)
@@ -130,7 +131,7 @@ class TestSimpleRun(helpers.FilesystemMockingTestCase):
# re-write cloud.cfg with unverified_modules override
cfg = copy.deepcopy(self.cfg)
cfg['unverified_modules'] = ['spacewalk'] # Would have skipped
- cloud_cfg = util.yaml_dumps(cfg)
+ cloud_cfg = safeyaml.dumps(cfg)
util.ensure_dir(os.path.join(self.new_root, 'etc', 'cloud'))
util.write_file(os.path.join(self.new_root, 'etc',
'cloud', 'cloud.cfg'), cloud_cfg)
@@ -159,7 +160,7 @@ class TestSimpleRun(helpers.FilesystemMockingTestCase):
cfg = copy.deepcopy(self.cfg)
# Represent empty configuration in /etc/cloud/cloud.cfg
cfg['cloud_init_modules'] = None
- cloud_cfg = util.yaml_dumps(cfg)
+ cloud_cfg = safeyaml.dumps(cfg)
util.ensure_dir(os.path.join(self.new_root, 'etc', 'cloud'))
util.write_file(os.path.join(self.new_root, 'etc',
'cloud', 'cloud.cfg'), cloud_cfg)