#NEWLINE# def test_extraneous_query_is_not_run( self ) : #NEWLINE# #INDENT# Formset = modelformset_factory ( Network , fields = '__all__' ) #NEWLINE# data = { #NEWLINE# #INDENT# 'test-TOTAL_FORMS' : '1' , #NEWLINE# 'test-INITIAL_FORMS' : '0' , #NEWLINE# 'test-MAX_NUM_FORMS' : '' , #NEWLINE# 'test-0-name' : 'Random Place' , #NEWLINE# #UNINDENT# } #NEWLINE# with self . assertNumQueries ( 1 ) : #NEWLINE# #INDENT# formset = Formset ( Formset , prefix = 'test' ) #NEWLINE# formset . save ( )