#NEWLINE# def test_disconnect_inport( inport , outport ) : #NEWLINE# #INDENT# inport . owner . did_disconnect = Mock ( ) #NEWLINE# endpoint = LocalInEndpoint ( outport , outport ) #NEWLINE# inport . attach_endpoint ( endpoint ) #NEWLINE# assert ( inport . disconnect ( ) == [ endpoint ] ) #NEWLINE# assert inport . owner . did_disconnect . called