summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJames Falcon <james.falcon@canonical.com>2021-10-18 10:20:18 -0500
committerGitHub <noreply@github.com>2021-10-18 09:20:18 -0600
commit125dcb28ea30affeec44029d99bee4b130d5fdc8 (patch)
tree416f0ed13d092df46ca6b0e1cb81d2e83b624fbb /tests
parenta9501251aadf6d30192f7bd7debeabc9c3e29420 (diff)
downloadvyos-cloud-init-125dcb28ea30affeec44029d99bee4b130d5fdc8.tar.gz
vyos-cloud-init-125dcb28ea30affeec44029d99bee4b130d5fdc8.zip
Fix unit test broken by pyyaml upgrade (#1071)
PyYAML upgraded from 5.4.1 to 6.0.0. 6.0.0 always requires a `Loader` arg to `yaml.load()`
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_net_freebsd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_net_freebsd.py b/tests/unittests/test_net_freebsd.py
index 466d472b..e339e132 100644
--- a/tests/unittests/test_net_freebsd.py
+++ b/tests/unittests/test_net_freebsd.py
@@ -1,8 +1,8 @@
import os
-import yaml
import cloudinit.net
import cloudinit.net.network_state
+from cloudinit import safeyaml
from cloudinit.tests.helpers import (CiTestCase, mock, readResource, dir2dict)
@@ -65,7 +65,7 @@ class TestFreeBSDRoundTrip(CiTestCase):
entry = {
'yaml': V1,
}
- network_config = yaml.load(entry['yaml'])
+ network_config = safeyaml.load(entry['yaml'])
ns = cloudinit.net.network_state.parse_net_config_data(network_config)
files = self._render_and_read(state=ns)
assert files == {