salt/tests/integration/states
Erik Johnson 3184168365 Use explicit unicode strings + break up salt.utils
This PR is part of what will be an ongoing effort to use explicit
unicode strings in Salt. Because Python 3 does not suport Python 2's raw
unicode string syntax (i.e. `ur'\d+'`), we must use
`salt.utils.locales.sdecode()` to ensure that the raw string is unicode.
However, because of how `salt/utils/__init__.py` has evolved into the
hulking monstrosity it is today, this means importing a large module in
places where it is not needed, which could negatively impact
performance. For this reason, this PR also breaks out some of the
functions from `salt/utils/__init__.py` into new/existing modules under
`salt/utils/`. The long term goal will be that the modules within this
directory do not depend on importing `salt.utils`.

A summary of the changes in this PR is as follows:

* Moves the following functions from `salt.utils` to new locations
  (including a deprecation warning if invoked from `salt.utils`):
  `to_bytes`, `to_str`, `to_unicode`, `str_to_num`, `is_quoted`,
  `dequote`, `is_hex`, `is_bin_str`, `rand_string`,
  `contains_whitespace`, `clean_kwargs`, `invalid_kwargs`, `which`,
  `which_bin`, `path_join`, `shlex_split`, `rand_str`, `is_windows`,
  `is_proxy`, `is_linux`, `is_darwin`, `is_sunos`, `is_smartos`,
  `is_smartos_globalzone`, `is_smartos_zone`, `is_freebsd`, `is_netbsd`,
  `is_openbsd`, `is_aix`
* Moves the functions already deprecated by @rallytime to the bottom of
  `salt/utils/__init__.py` for better organization, so we can keep the
  deprecated ones separate from the ones yet to be deprecated as we
  continue to break up `salt.utils`
* Updates `salt/*.py` and all files under `salt/client/` to use explicit
  unicode string literals.
* Gets rid of implicit imports of `salt.utils` (e.g. `from salt.utils
  import foo` becomes `import salt.utils.foo as foo`).
* Renames the `test.rand_str` function to `test.random_hash` to more
  accurately reflect what it does
* Modifies `salt.utils.stringutils.random()` (née `salt.utils.rand_string()`)
  such that it returns a string matching the passed size. Previously
  this function would get `size` bytes from `os.urandom()`,
  base64-encode it, and return the result, which would in most cases not
  be equal to the passed size.
2017-08-08 13:33:43 -05:00
..
__init__.py Include the python encoding file header on tests. 2013-11-27 11:19:24 +00:00
test_alternatives.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_archive.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_boto_sns.py Don't attempt connections at the module level! 2017-04-28 13:33:32 +01:00
test_bower.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_cmd.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_compiler.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_docker_container.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_file.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_git.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_handle_error.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_handle_iorder.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_host.py Update all references for moved functions to use "files" util 2017-07-18 10:31:01 -06:00
test_keystone.py Merge branch '2016.11' into 'nitrogen' 2017-05-30 10:16:14 -06:00
test_match.py Update all references for moved functions to use "files" util 2017-07-18 10:31:01 -06:00
test_mysql.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_network.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_npm.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_pip.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_pkg.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_pkgrepo.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_rabbitmq_user.py Use the more portable helper skip_if_not_root. 2017-04-04 18:58:21 +01:00
test_rabbitmq_vhost.py Use the more portable helper skip_if_not_root. 2017-04-04 18:58:21 +01:00
test_renderers.py Merge branch '2016.11' into '2017.7' 2017-07-20 09:54:08 -06:00
test_service.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_ssh.py Update all references for moved functions to use "files" util 2017-07-18 10:31:01 -06:00
test_supervisord.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_svn.py Import from the original modules not tests.integration 2017-04-04 18:58:19 +01:00
test_user.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_virtualenv.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00
test_zookeeper.py Use explicit unicode strings + break up salt.utils 2017-08-08 13:33:43 -05:00