#NEWLINE# def test_update_document( self ) : #NEWLINE# #INDENT# updates = { #NEWLINE# #INDENT# 'title' : 'Api_title' , #NEWLINE# 'folder' : self . folder . id , #NEWLINE# 'body' : 'Api test body' , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . put ( path = reverse ( 'api_documents_documents' , kwargs = { #NEWLINE# #INDENT# 'object_ptr' : self . document . id , #NEWLINE# #UNINDENT# } ) , content_type = self . content_type , data = json . dumps ( updates ) , ** self . authentication_headers ) #NEWLINE# self . assertEquals ( response . status_code , 200 ) #NEWLINE# data = json . loads ( response . content ) #NEWLINE# self . assertEquals ( data [ 'title' ] , updates [ 'title' ] ) #NEWLINE# self . assertEquals ( data [ 'folder' ] [ 'id' ] , updates [ 'folder' ] ) #NEWLINE# self . assertEquals ( data [ 'body' ] , updates [ 'body' ] )