test_win_autoruns.py 677 B

12345678910111213141516171819202122232425262728
  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. import pytest
  10. @skipIf(not salt.utils.platform.is_windows(), 'windows tests only')
  11. @pytest.mark.windows_whitelisted
  12. class AutoRunsModuleTest(ModuleCase):
  13. '''
  14. Test the autoruns module
  15. '''
  16. def test_win_autoruns_list(self):
  17. '''
  18. test win_autoruns.list module
  19. '''
  20. ret = self.run_function('autoruns.list')
  21. self.assertIn('HKLM', str(ret))
  22. self.assertTrue(isinstance(ret, dict))