#NEWLINE# def test_send_message( self ) : #NEWLINE# #INDENT# recipient = '#test' #NEWLINE# message = 'test' #NEWLINE# expected_result = 'PRIVMSG #test :test\r\n' #NEWLINE# self . wrapper . send_message ( recipient , message ) #NEWLINE# self . assertEqual ( expected_result , self . wrapper . out_buffer ) #NEWLINE# self . wrapper . out_buffer = '' #NEWLINE# recipient = '#test' #NEWLINE# message = 'dances' #NEWLINE# expected_result = 'PRIVMSG #test :\x01ACTION dances\x01\r\n' #NEWLINE# self . wrapper . send_message ( recipient , message , action = True ) #NEWLINE# self . assertEqual ( expected_result , self . wrapper . out_buffer ) #NEWLINE# self . wrapper . out_buffer = '' #NEWLINE# recipient = '#test' #NEWLINE# message = 'attention!' #NEWLINE# expected_result = 'NOTICE #test :attention!\r\n' #NEWLINE# self . wrapper . send_message ( recipient , message , notice = True ) #NEWLINE# self . assertEqual ( recipient , self . wrapper . out_buffer )