#NEWLINE# @ istest #NEWLINE# def checks_that_a_user_exists( self ) : #NEWLINE# #INDENT# with self . execute_mock ( ) as execute : #NEWLINE# #INDENT# execute . return_value = [ 'john' , 'jack' ] #NEWLINE# result = self . role . user_exists ( 'john' ) #NEWLINE# self . assertTrue ( result ) #NEWLINE# execute . assert_called_with ( 'rabbitmqctl list_users' , sudo = True , stdout = False )