<s> import unittest <EOL> import stomp <EOL> from stomp . listener import TestListener <EOL> from stomp . test . testutils import * <EOL> class TestRabbitMQSend ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> pass <EOL> def testbasic ( self ) : <EOL> conn = stomp . Connection11 ( get_rabbitmq_host ( ) ) <EOL> listener = TestListener ( '<STR_LIT>' ) <EOL> conn . set_listener ( '<STR_LIT>' , listener ) <EOL> conn . start ( ) <EOL> conn . connect ( get_rabbitmq_user ( ) , get_rabbitmq_password ( ) , wait = True ) <EOL> conn . subscribe ( destination = '<STR_LIT>' , id = <NUM_LIT:1> , ack = '<STR_LIT>' ) <EOL> conn . send ( body = '<STR_LIT>' , destination = '<STR_LIT>' , receipt = '<STR_LIT>' ) <EOL> listener . wait_on_receipt ( ) <EOL> conn . disconnect ( receipt = None ) <EOL> self . assertTrue ( listener . connections == <NUM_LIT:1> , '<STR_LIT>' ) <EOL> self . assertTrue ( listener . messages == <NUM_LIT:1> , '<STR_LIT>' ) <EOL> self . assertTrue ( listener . errors == <NUM_LIT:0> , '<STR_LIT>' ) </s>
