diff options
Diffstat (limited to 'tests/unit/mock/yaml_helper.py')
-rw-r--r-- | tests/unit/mock/yaml_helper.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/unit/mock/yaml_helper.py b/tests/unit/mock/yaml_helper.py index 540055d..2e85759 100644 --- a/tests/unit/mock/yaml_helper.py +++ b/tests/unit/mock/yaml_helper.py @@ -1,9 +1,11 @@ from __future__ import absolute_import, division, print_function + __metaclass__ = type import io import yaml + from ansible.module_utils.six import PY3 from ansible.parsing.yaml.dumper import AnsibleDumper from ansible.parsing.yaml.loader import AnsibleLoader @@ -115,10 +117,14 @@ class YamlTestUtils(object): yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper) else: yaml_string_obj_from_stream = yaml.dump( - obj_from_stream, Dumper=AnsibleDumper, encoding=None + obj_from_stream, + Dumper=AnsibleDumper, + encoding=None, ) yaml_string_obj_from_string = yaml.dump( - obj_from_string, Dumper=AnsibleDumper, encoding=None + obj_from_string, + Dumper=AnsibleDumper, + encoding=None, ) assert yaml_string == yaml_string_obj_from_stream |