Disable 'default_flow_style' for yaml.dump

If this option is False,
the collections is always serialized in the block style.

Change-Id: I8e8d7cc1773b8c20968ff526110387a0590690b1
Closes-Bug: 1585271
This commit is contained in:
Bulat Gaifullin
2016-05-24 18:48:25 +03:00
parent 0af74e41be
commit bdf612bf43
2 changed files with 6 additions and 2 deletions

View File

@@ -138,7 +138,9 @@ class TestYaqlExt(BaseUnitTest):
)
def test_to_yaml(self):
expected = yaml.safe_dump(self.variables['$%new']['configs'])
expected = yaml.safe_dump(
self.variables['$%new']['configs'], default_flow_style=False
)
actual = self.evaluate('$.configs.toYaml()')
self.assertEqual(expected, actual)