#NEWLINE# def test_send_message( self ) : #NEWLINE# #INDENT# updates = { #NEWLINE# #INDENT# 'title' : 'API message title' , #NEWLINE# 'body' : 'Test body' , #NEWLINE# 'stream' : self . stream . id , #NEWLINE# 'multicomplete_recipients' : 'test@test.com' , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( path = reverse ( 'api_messaging_messages' ) , content_type = self . content_type , data = json . dumps ( updates ) , ** self . authentication_headers ) #NEWLINE# self . assertEquals ( response . status_code , 200 ) #NEWLINE# data = json . loads ( self . content ) #NEWLINE# self . assertEquals ( data [ 'title' ] , updates [ 'title' ] ) #NEWLINE# self . assertEquals ( data [ 'body' ] , updates [ 'body' ] ) #NEWLINE# self . assertEquals ( data [ 'stream' ] [ 'id' ] , updates [ 'stream' ] )