def test_client_closed(self):
        """
        SSHSession.closed() should tell the transport connected to the client
        that the connection was lost.
        """
        self.session.client = StubClient()
        self.session.closed()
        self.assertTrue(self.session.client.transport.close)
        self.session.client.transport.close = False

        SSHSession.closed() should tell the transport connected to the client
        that the connection was lost.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_session.py