mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix test on platforms that do not have cdumper
This commit is contained in:
parent
818dd9f827
commit
b6e3f9b2c6
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ def test_yaml_indent_safe_ordered_dump():
|
|||
Test yaml.dump with IndentedSafeOrderedDumper
|
||||
"""
|
||||
data = OrderedDict([("foo", ["bar", "baz"]), ("qux", "quux")])
|
||||
exp_yaml = "foo:\n- bar\n- baz\nqux: quux\n"
|
||||
# Account for difference in SafeDumper vs CSafeDumper
|
||||
if salt.utils.yamldumper.SafeDumper.__name__ == "SafeDumper":
|
||||
exp_yaml = "foo:\n - bar\n - baz\nqux: quux\n"
|
||||
else:
|
||||
exp_yaml = "foo:\n- bar\n- baz\nqux: quux\n"
|
||||
assert (
|
||||
salt.utils.yamldumper.dump(
|
||||
data,
|
||||
|
|
Loading…
Add table
Reference in a new issue