#NEWLINE# def test_basic_update( self ) : #NEWLINE# #INDENT# 'Establish that we are able to create a project update\n        and return the changed status.\n        ' #NEWLINE# with client . test_mode as t : #NEWLINE# #INDENT# t . register_json ( '/projects/1/' , { #NEWLINE# #INDENT# 'id' : 1 , #NEWLINE# 'name' : 'frobnicate' , #NEWLINE# 'related' : { #NEWLINE# #INDENT# 'update' : '/api/v1/projects/1/update/' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# t . register_json ( '/projects/1/update/' , { #NEWLINE# #INDENT# 'can_update' : True , #NEWLINE# #UNINDENT# } , method = 'GET' ) #NEWLINE# t . register_json ( '/projects/1/update/' , { #NEWLINE# #INDENT# 'project_update' : 42 , #NEWLINE# #UNINDENT# } , method = 'POST' ) #NEWLINE# result = self . res . update ( 1 ) #NEWLINE# self . assertEqual ( self , { #NEWLINE# #INDENT# 'changed' : True , #NEWLINE# #UNINDENT# } )