test_splay.py 669 B

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, print_function, unicode_literals
  3. # Import Salt libs
  4. from tests.support.mixins import LoaderModuleMockMixin
  5. from tests.support.unit import TestCase
  6. import salt.executors.splay as splay_exec
  7. class SplayTestCase(TestCase, LoaderModuleMockMixin):
  8. def setup_loader_modules(self):
  9. return {
  10. splay_exec: {
  11. '__grains__': {'id': 'foo'},
  12. }
  13. }
  14. def test__get_hash(self):
  15. # We just want to make sure that this function does not result in an
  16. # error due to passing a unicode value to bytearray()
  17. assert splay_exec._get_hash()