#NEWLINE# def test_solution_is_readonly( self ) : #NEWLINE# #INDENT# q = QuestionFactory ( ) #NEWLINE# a = AnswerFactory ( question = q ) #NEWLINE# self . data [ 'solution' ] = a . id #NEWLINE# serializer = api . QuestionSerializer ( context = self . context , data = self . data , instance = self ) #NEWLINE# serializer . is_valid ( raise_exception = True ) #NEWLINE# serializer . save ( ) #NEWLINE# eq_ ( q . solution , None )