test_win_autoruns.py 629 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. # Import Python libs
  3. from __future__ import absolute_import
  4. # Import Salt Testing libs
  5. from tests.support.case import ModuleCase
  6. from tests.support.unit import skipIf
  7. # Import Salt libs
  8. import salt.utils.platform
  9. @skipIf(not salt.utils.platform.is_windows(), 'windows tests only')
  10. class AutoRunsModuleTest(ModuleCase):
  11. '''
  12. Test the autoruns module
  13. '''
  14. def test_win_autoruns_list(self):
  15. '''
  16. test win_autoruns.list module
  17. '''
  18. ret = self.run_function('autoruns.list')
  19. self.assertIn('HKLM', str(ret))
  20. self.assertTrue(isinstance(ret, dict))