#NEWLINE# def test_should_use_list_of_fields_to_update_from_arguments_if_it_passed( self ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'title' : 'goodbye' , #NEWLINE# 'text' : 'moon' , #NEWLINE# #UNINDENT# } #NEWLINE# serializer = CommentSerializer ( instance = self . get_comment ( ) , data = data , partial = True ) #NEWLINE# self . assertTrue ( serializer . is_valid ( ) ) #NEWLINE# serializer . save ( ** { #NEWLINE# #INDENT# 'update_fields' : [ 'title' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# fresh_instance = self . get_comment ( ) #NEWLINE# self . assertEqual ( fresh_instance . title , 'goodbye' ) #NEWLINE# self . assertEqual ( fresh_instance . text , 'world' )