Fix unit.modules.test_pw_group for Windows

Skip `test_info` and `test_getent` because they require grp which is not
available on Windows
This commit is contained in:
twangboy 2017-09-07 15:34:57 -06:00
parent f959113694
commit 78e39a1b9d

View file

@ -18,6 +18,7 @@ from tests.support.mock import (
# Import Salt Libs
import salt.modules.pw_group as pw_group
import salt.utils
@skipIf(NO_MOCK, NO_MOCK_REASON)
@ -44,6 +45,7 @@ class PwGroupTestCase(TestCase, LoaderModuleMockMixin):
with patch.dict(pw_group.__salt__, {'cmd.run_all': mock}):
self.assertTrue(pw_group.delete('a'))
@skipIf(salt.utils.is_windows(), 'grp not available on Windows')
def test_info(self):
'''
Tests to return information about a group
@ -57,6 +59,7 @@ class PwGroupTestCase(TestCase, LoaderModuleMockMixin):
with patch.dict(pw_group.grinfo, mock):
self.assertDictEqual(pw_group.info('name'), {})
@skipIf(salt.utils.is_windows(), 'grp not available on Windows')
def test_getent(self):
'''
Tests for return info on all groups