def setUp(self): configure(CONFIG) self.received_messages = [] queue_address = uuid4().hex create_queue(queue_address, durable=False, auto_delete=True, priorities=5, extra_properties={'qpid.auto_delete_timeout': 10}) self.sender = Sender(queue_address) def handle_received_message(message: Message): self.received_messages.append(message) return True self.receiver = Receiver(handle_received_message, queue_address)
def setUp(self): configure(CONFIG)
def test_get_urls_priority_from_args(self): environ['AMQP_SERVERS'] = 'amqps://environ.example' configure({'amqp_url': 'amqps://config.example'}) self.assertEqual(get_urls('amqps://args.example'), ['amqps://args.example'])
def setUp(self): configure(CONFIG) self.queue_address = uuid4().hex self.exchange_address = uuid4().hex