def test_lookupSubsystem_closeReceived(self):
        """
        SSHSession.closeReceived() should sent a close message to the remote
        side.
        """
        self.session.requestReceived(b'subsystem',
                                     common.NS(b'TestSubsystem') + b'data')

        self.session.closeReceived()
        self.assertTrue(self.session.conn.closes[self.session])

        SSHSession.closeReceived() should sent a close message to the remote
        side.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_session.py