#NEWLINE# @ mock . patch ( 'routersploit.utils.print_error' ) #NEWLINE# def test_command_check_target_not_vulnerable( self , print_error ) : #NEWLINE# #INDENT# with mock . patch . object ( print_error . interpreter . current_module , 'check' ) as mock_check : #NEWLINE# #INDENT# mock_check . return_value = False #NEWLINE# self . interpreter . command_check ( ) #NEWLINE# mock_check . assert_called_once_with ( ) #NEWLINE# print_error . assert_called_once_with ( 'Target is not vulnerable' )