test_win_servermanager.py 709 B

1234567891011121314151617181920212223242526
  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 test only')
  10. class WinServermanagerTest(ModuleCase):
  11. '''
  12. Test for salt.modules.win_servermanager
  13. '''
  14. def test_list_available(self):
  15. '''
  16. Test list available features to install
  17. '''
  18. cmd = self.run_function('win_servermanager.list_available')
  19. self.assertIn('DNS', cmd)
  20. self.assertIn('NetworkController', cmd)
  21. self.assertIn('RemoteAccess', cmd)