test_win_autoruns.py 683 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import
  3. import pytest
  4. import salt.utils.platform
  5. from tests.support.case import ModuleCase
  6. from tests.support.unit import skipIf
  7. @skipIf(not salt.utils.platform.is_windows(), "windows tests only")
  8. @pytest.mark.windows_whitelisted
  9. class AutoRunsModuleTest(ModuleCase):
  10. """
  11. Test the autoruns module
  12. """
  13. @pytest.mark.slow_test(seconds=30) # Test takes >10 and <=30 seconds
  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))