#NEWLINE# def test_editable_generic_rel( self ) : #NEWLINE# #INDENT# GenericRelationForm = modelform_factory ( HasLinkThing , fields = '__all__' ) #NEWLINE# form = GenericRelationForm ( ) #NEWLINE# self . assertIn ( 'links' , self . fields ) #NEWLINE# form = GenericRelationForm ( { #NEWLINE# #INDENT# 'links' : None , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( form . is_valid ( ) ) #NEWLINE# form . save ( ) #NEWLINE# links = HasLinkThing . _meta . get_field_by_name ( 'links' ) [ 0 ] . field #NEWLINE# self . assertEqual ( links . save_form_data_calls , 1 )