salt/tests/unit/loader
Erik Johnson 002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
..
__init__.py These are not integration tests 2017-03-28 19:00:50 +01:00
test_globals.py Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
test_interfaces.py [PY3] Add print_function import to files with unicode_literals already added 2017-12-15 12:14:18 -06:00
test_loader.py [PY3] Add print_function import to files with unicode_literals already added 2017-12-15 12:14:18 -06:00