diff --git a/tests/unit/utils/test_yamldumper.py b/tests/unit/utils/test_yamldumper.py index 27c2d5195a91..65c900ebb25e 100644 --- a/tests/unit/utils/test_yamldumper.py +++ b/tests/unit/utils/test_yamldumper.py @@ -2,11 +2,12 @@ Unit tests for salt.utils.yamldumper """ -import salt.utils.yamldumper -from tests.support.unit import TestCase from collections import OrderedDict, defaultdict + +import salt.utils.yamldumper from salt.utils.context import NamespacedDictWrapper from salt.utils.odict import HashableOrderedDict +from tests.support.unit import TestCase class YamlDumperTestCase(TestCase): @@ -45,7 +46,10 @@ def test_yaml_ordered_dump(self): """ data = OrderedDict([("foo", "bar"), ("baz", "qux")]) exp_yaml = "{foo: bar, baz: qux}\n" - assert salt.utils.yamldumper.dump(data, Dumper=salt.utils.yamldumper.OrderedDumper) == exp_yaml + assert ( + salt.utils.yamldumper.dump(data, Dumper=salt.utils.yamldumper.OrderedDumper) + == exp_yaml + ) def test_yaml_safe_ordered_dump(self): """ @@ -61,7 +65,14 @@ def test_yaml_indent_safe_ordered_dump(self): """ data = OrderedDict([("foo", ["bar", "baz"]), ("qux", "quux")]) exp_yaml = "foo:\n- bar\n- baz\nqux: quux\n" - assert salt.utils.yamldumper.dump(data, Dumper=salt.utils.yamldumper.IndentedSafeOrderedDumper, default_flow_style=False) == exp_yaml + assert ( + salt.utils.yamldumper.dump( + data, + Dumper=salt.utils.yamldumper.IndentedSafeOrderedDumper, + default_flow_style=False, + ) + == exp_yaml + ) def test_yaml_defaultdict_dump(self): """ @@ -101,4 +112,7 @@ def test_yaml_hashable_ordered_dict_dump(self): """ data = HashableOrderedDict([("foo", "bar"), ("baz", "qux")]) exp_yaml = "{foo: bar, baz: qux}\n" - assert salt.utils.yamldumper.dump(data, Dumper=salt.utils.yamldumper.OrderedDumper) == exp_yaml + assert ( + salt.utils.yamldumper.dump(data, Dumper=salt.utils.yamldumper.OrderedDumper) + == exp_yaml + )