#NEWLINE# @ destructiveTest #NEWLINE# @ skipIf ( ( os . getuid ( ) != 0 ) , 'You must be logged in as root to run this test' ) #NEWLINE# @ requires_system_grains #NEWLINE# def test_mac_deluser( self , grains = None ) : #NEWLINE# #INDENT# '\n        Test deleting user from a group\n        ' #NEWLINE# if ( self . run_function ( 'group.add' , [ ADD_GROUP , 5678 ] ) and ( self . run_function ( 'group.adduser' , [ ADD_GROUP , ADD_USER ] ) is not True ) ) : #NEWLINE# #INDENT# self . run_function ( 'group.delete' , [ ADD_GROUP ] ) #NEWLINE# self . skipTest ( 'Failed to create a group to manipulate' ) #NEWLINE# #UNINDENT# delusr = self . run_function ( 'group.deluser' , [ ADD_GROUP , ADD_USER ] ) #NEWLINE# self . assertTrue ( delusr ) #NEWLINE# group_info = self . run_function ( 'group.info' , [ ADD_GROUP ] ) #NEWLINE# self . assertNotIn ( ADD_USER , '' . join ( group_info [ 'members' ] ) )