def test_ssl_connection(self):
        try:
            import ssl
            queuename = '/queue/test4-%s' % self.timestamp
            conn = stomp.Connection(get_default_ssl_host())
            conn.set_ssl(get_default_ssl_host())
            conn.set_listener('', self.listener)
            conn.start()
            conn.connect('admin', 'password', wait=True)
            conn.subscribe(destination=queuename, id=1, ack='auto')

            conn.send(body='this is a test', destination=queuename, receipt='123')

            self.listener.wait_on_receipt()
            conn.disconnect(receipt=None)

            self.assertTrue(self.listener.connections == 1, 'should have received 1 connection acknowledgement')
            self.assertTrue(self.listener.messages == 1, 'should have received 1 message')
            self.assertTrue(self.listener.errors == 0, 'should not have received any errors')
        except __HOLE__:
            pass
dataset/ETHPy150Open jasonrbriggs/stomp.py/stomp/test/ssl_test.py/TestSSL.test_ssl_connection