Skip to main content

Testcontainer for RabbitMQ

Project description

Python Testcontainer RabbitMQ

Usage

import pika
from testcontainer_python_rabbitmq import RabbitMQContainer


def test_rabbitmq():
    config = RabbitMQContainer()
    with config as container:
        connection = pika.BlockingConnection(
            pika.ConnectionParameters(
                host=container.get_container_host_ip(),
                port=container.get_amqp_port(),
                credentials=pika.PlainCredentials(username="guest", password="guest"),
            )
        )
        
        # do something...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testcontainer-python-rabbitmq-0.3.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page