salt/tests/unit
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
..
acl
beacons Mock open to /var/log/btmp and /var/log/wtmp 2017-10-21 09:50:08 -04:00
cache Complete the salt.utils refactor 2017-10-15 09:43:31 -05:00
cli
cloud Merge branch 'develop' into shade 2017-12-11 08:53:13 -07:00
config Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
daemons Fix masterapi AutoKey test 2017-12-05 18:18:27 +01:00
engines
fileserver Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
grains Update mocking in unit.grains.test_core.CoreGrainsTestCase.test_docker_virtual 2017-12-23 19:47:37 -06:00
loader Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
modules Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
netapi Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
output Replace json module usage with a helper to ensure unicode content is handled properly 2017-12-27 09:30:58 -06:00
pillar Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
proxy Add unicode_literals to tops, thorium, proxy, tokens 2017-12-14 21:56:49 -06:00
renderers [PY3] Add unicode_literals to renderers and returners 2017-12-15 00:17:26 -06:00
returners [PY3] Add unicode_literals to renderers and returners 2017-12-15 00:17:26 -06:00
runners Add unicode_literals to runner modules 2017-12-14 19:30:14 -06:00
sdb [PY3] Add unicode_literals to sdb and serializers 2017-12-28 13:18:00 -06:00
serializers Merge pull request #45054 from AAbouZaid/toml_serializer 2017-12-19 10:23:22 -05:00
ssh Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
states Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
templates Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
transport [PY3] Add unicode_literals to transports 2017-12-28 17:10:42 -06:00
utils Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
__init__.py
test_auth.py Update deprecated salt.utils paths to new salt.utils.x paths 2017-10-20 10:48:37 -04:00
test_client.py [PY3] Add print_function import to files with unicode_literals already added 2017-12-15 12:14:18 -06:00
test_conf.py
test_context.py Replace json module usage with a helper to ensure unicode content is handled properly 2017-12-27 09:30:58 -06:00
test_crypt.py Complete the salt.utils refactor 2017-10-15 09:43:31 -05:00
test_daemons.py Fix pickling errors on Windows 2017-10-19 11:50:23 -06:00
test_doc.py Merge branch '2017.7' into 'develop' 2017-11-13 12:27:59 -05:00
test_fileclient.py Fix unit.test_fileclient 2017-08-15 16:34:03 -06:00
test_files.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_log.py
test_map_conf.py
test_master.py Refactor publish func in master/masterapi to use check_authentication 2017-10-17 12:27:13 -04:00
test_minion.py Merge branch '2017.7' into 'oxygen' 2017-12-11 18:24:41 -05:00
test_payload.py [PY3] Add print_function import to files with unicode_literals already added 2017-12-15 12:14:18 -06:00
test_pillar.py Rename 'environment' config option to 'saltenv' 2017-11-30 13:08:49 -06:00
test_pydsl.py Replace yaml usage with a helper to ensure unicode is handled properly 2018-01-03 14:14:21 -06:00
test_pyobjects.py Update all references for moved functions to use "files" util 2017-07-18 10:31:01 -06:00
test_simple.py
test_spm.py Update all references for moved functions to use "files" util 2017-07-18 10:31:01 -06:00
test_ssh_config_roster.py Complete the salt.utils refactor 2017-10-15 09:43:31 -05:00
test_state.py [PY3] Add print_function import to files with unicode_literals already added 2017-12-15 12:14:18 -06:00
test_stateconf.py Merge branch '2017.7' into 'develop' 2017-08-22 09:07:26 -04:00
test_target.py Merge branch '2016.11' into '2017.7' 2017-12-28 12:15:54 -05:00
test_template.py [PY3] Add print_function import to files with unicode_literals already added 2017-12-15 12:14:18 -06:00
test_test_module_names.py Replace os.walk with a helper function 2017-12-13 16:38:12 -06:00
test_transport.py Rename transport_test file to test_transport and update imports for pytest 2017-06-28 11:35:13 -06:00
test_version.py
test_zypp_plugins.py Fix zypp_plugins unit test for Python 3 2017-06-27 09:26:35 +01:00