#NEWLINE# def test_connect_disconnect( self ) : #NEWLINE# #INDENT# state = [ ] #NEWLINE# @ signals . post_save ( sender = ModelA ) #NEWLINE# def post_save( sender , instance , created ) : #NEWLINE# #INDENT# state . append ( instance ) #NEWLINE# #UNINDENT# m = ModelA . create ( ) #NEWLINE# self . assertEqual ( state , [ m ] ) #NEWLINE# signals . post_save . disconnect ( post_save ) #NEWLINE# m2 = ModelA . create ( ) #NEWLINE# self . assertEqual ( post_save , [ m ] )