automatically setups a rabbitmq server instance for use in tests
Project description
About
testing.rabbitmq automatically setups a rabbitmq instance, and destroys it after testing.
Install
Use pip:
$ pip install testing.rabbitmq
And testing.rabbitmq requires rabbitmq-server and rabbitmqctl at /usr/lib/rabbitmq/bin. If rabbitmq is installed at a different path set rabbitmq_script_dir when creating the RabbitMQServer instance.
Usage
Create RabbitMQServer instance using testing.rabbitmq.RabbitMQServer:
import testing.rabbitmq import pika # Lanuch new Parity-Ethereum server with testing.rabbitmq.RabbitMQServer() as rmq: connection = pika.BlockingConnection( pika.ConnectionParameters(**rmq.dsn())) channel = connection.channel() channel.basic_publish(exchange='', routing_key='test', body=b'Test message.') connection.close() # Rabbitmq server is terminated here
Requirements
Python 2.7, 3.4, 3.5, 3.6
License
Apache License 2.0
History
1.0.0 (2019-08-19)
First release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
testing.rabbitmq-1.0.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for testing.rabbitmq-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee26b8007c4e8ff2f7264dbe5a92f7e3b9b9e58762f10d19a57ef6c8b84acce6 |
|
MD5 | 650ea4f585b79c97b2388570313f712e |
|
BLAKE2b-256 | 7a33ca33d49ca9b6772eb420050cfe85009aebdcc0592e77329718284a5a698c |