Skip to content

Commit 125dcb2

Browse files
Fix unit test broken by pyyaml upgrade (canonical#1071)
PyYAML upgraded from 5.4.1 to 6.0.0. 6.0.0 always requires a `Loader` arg to `yaml.load()`
1 parent a950125 commit 125dcb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unittests/test_net_freebsd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
2-
import yaml
32

43
import cloudinit.net
54
import cloudinit.net.network_state
5+
from cloudinit import safeyaml
66
from cloudinit.tests.helpers import (CiTestCase, mock, readResource, dir2dict)
77

88

@@ -65,7 +65,7 @@ def test_render_output_has_yaml(self, mock_subp):
6565
entry = {
6666
'yaml': V1,
6767
}
68-
network_config = yaml.load(entry['yaml'])
68+
network_config = safeyaml.load(entry['yaml'])
6969
ns = cloudinit.net.network_state.parse_net_config_data(network_config)
7070
files = self._render_and_read(state=ns)
7171
assert files == {

0 commit comments

Comments
 (0)