#NEWLINE# def test_notifyDisconnect_after_disconnection( self ) : #NEWLINE# #INDENT# "\n        notifyDisconnect doesn't return a fired Deferred if it's called after\n        disconnection but instead returns a Deferred that fires after the next\n        disconnection.\n        " #NEWLINE# self . successResultOf ( self . factory . connect ( ) ) #NEWLINE# self . endpoint . disconnect ( FakeDisconnectedError ( ) ) #NEWLINE# d = self . factory . notifyDisconnect ( ) #NEWLINE# self . assertNoResult ( self ) #NEWLINE# self . successResultOf ( self . factory . connect ( ) ) #NEWLINE# self . endpoint . disconnect ( FakeDisconnectedError ( ) ) #NEWLINE# self . failureResultOf ( d , FakeDisconnectedError ) #NEWLINE# self . assertEqual ( len ( self . flushLoggedErrors ( FakeDisconnectedError ) ) , 2 )