def test_outConnectionLost(self):
        """
        When outConnectionLost and errConnectionLost are both called, we should
        send an EOF message.
        """
        self.pp.outConnectionLost()
        self.assertFalse(self.session in self.session.conn.eofs)
        self.pp.errConnectionLost()
        self.assertTrue(self.session.conn.eofs[self.session])

        When outConnectionLost and errConnectionLost are both called, we should
        send an EOF message.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_session.py