Browse Source

Fix test_cloud_config for PyYAML 5.1

PyYAML 5.1 changed default_flow_style=False. It's
backward incompatible.

Change-Id: I7b938b52b35d5546a674da50693c9c566f42120b
Story: #2005401
Task: #30395
tags/13.0.0.0rc1
Rabi Mishra 8 months ago
parent
commit
f2faa5e1ae
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      heat/tests/openstack/heat/test_cloud_config.py

+ 3
- 1
heat/tests/openstack/heat/test_cloud_config.py View File

@@ -12,6 +12,7 @@
# under the License.

import uuid
import yaml

import mock

@@ -53,6 +54,7 @@ class CloudConfigTest(common.HeatTestCase):
kwargs = self.rpc_client.create_software_config.call_args[1]
self.assertEqual({
'name': self.config.physical_resource_name(),
'config': '#cloud-config\n{foo: bar}\n',
'config': '\n'.join(['#cloud-config',
yaml.safe_dump({'foo': 'bar'})]),
'group': 'Heat::Ungrouped'
}, kwargs)

Loading…
Cancel
Save