#NEWLINE# def test_topic_required( self ) : #NEWLINE# #INDENT# del self . data [ 'topic' ] #NEWLINE# serializer = api . QuestionSerializer ( context = serializer . context , data = self . data ) #NEWLINE# ok_ ( ( not serializer . is_valid ( ) ) ) #NEWLINE# eq_ ( serializer . errors , { #NEWLINE# #INDENT# 'topic' : [ 'This field is required.' ] , #NEWLINE# #UNINDENT# } )