@destructiveTest
    @skipIf(os.getuid() != 0, 'You must be logged in as root to run this test')
    @requires_system_grains
    def test_mac_adduser(self, grains=None):
        '''
        Tests adding user to the group
        '''
        # Create a group to use for test - If unsuccessful, skip the test
        if self.run_function('group.add', [ADD_GROUP, 5678]) is not True:
            self.run_function('group.delete', [ADD_GROUP])
            self.skipTest('Failed to create a group to manipulate')

        try:
            self.run_function('group.adduser', [ADD_GROUP, ADD_USER])
            group_info = self.run_function('group.info', [ADD_GROUP])
            self.assertEqual(ADD_USER, ''.join(group_info['members']))
        except __HOLE__:
            self.run_function('group.delete', [ADD_GROUP])
            raise
dataset/ETHPy150Open saltstack/salt/tests/integration/modules/mac_group.py/MacGroupModuleTest.test_mac_adduser