{"id":25968758,"url":"https://github.com/dbfixtures/pytest-rabbitmq","last_synced_at":"2025-08-17T21:12:46.880Z","repository":{"id":13485108,"uuid":"73863322","full_name":"dbfixtures/pytest-rabbitmq","owner":"dbfixtures","description":"This is a pytest plugin, that enables you to test your code that relies on a running RabbitMQ Queues. It allows you to specify additional fixtures for RabbitMQ process and client.","archived":false,"fork":false,"pushed_at":"2025-08-04T22:04:09.000Z","size":1058,"stargazers_count":45,"open_issues_count":4,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-06T01:33:19.076Z","etag":null,"topics":["pytest","pytest-plugin","python","rabbitmq"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/pytest-rabbitmq/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbfixtures.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-15T23:06:05.000Z","updated_at":"2025-08-04T22:04:10.000Z","dependencies_parsed_at":"2023-10-11T06:09:10.165Z","dependency_job_id":"e4db3053-4b62-4e17-9296-3732698b9290","html_url":"https://github.com/dbfixtures/pytest-rabbitmq","commit_stats":{"total_commits":342,"total_committers":10,"mean_commits":34.2,"dds":0.6461988304093567,"last_synced_commit":"5db0ce5771bacd0afd378a9c6e25973c46e5021b"},"previous_names":["dbfixtures/pytest-rabbitmq","clearcodehq/pytest-rabbitmq"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/dbfixtures/pytest-rabbitmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbfixtures%2Fpytest-rabbitmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbfixtures%2Fpytest-rabbitmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbfixtures%2Fpytest-rabbitmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbfixtures%2Fpytest-rabbitmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbfixtures","download_url":"https://codeload.github.com/dbfixtures/pytest-rabbitmq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbfixtures%2Fpytest-rabbitmq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270906516,"owners_count":24665796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pytest","pytest-plugin","python","rabbitmq"],"created_at":"2025-03-04T22:15:12.334Z","updated_at":"2025-08-17T21:12:46.800Z","avatar_url":"https://github.com/dbfixtures.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://raw.githubusercontent.com/dbfixtures/pytest-rabbitmq/master/logo.png\n    :width: 100px\n    :height: 100px\n\npytest-rabbitmq\n===============\n\n.. image:: https://img.shields.io/pypi/v/pytest-rabbitmq.svg\n    :target: https://pypi.python.org/pypi/pytest-rabbitmq/\n    :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/wheel/pytest-rabbitmq.svg\n    :target: https://pypi.python.org/pypi/pytest-rabbitmq/\n    :alt: Wheel Status\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-rabbitmq.svg\n    :target: https://pypi.python.org/pypi/pytest-rabbitmq/\n    :alt: Supported Python Versions\n\n.. image:: https://img.shields.io/pypi/l/pytest-rabbitmq.svg\n    :target: https://pypi.python.org/pypi/pytest-rabbitmq/\n    :alt: License\n\nPackage status\n--------------\n\n.. image:: https://travis-ci.org/dbfixtures/pytest-rabbitmq.svg?branch=v2.2.1\n    :target: https://travis-ci.org/dbfixtures/pytest-rabbitmq\n    :alt: Tests\n\n.. image:: https://coveralls.io/repos/dbfixtures/pytest-rabbitmq/badge.png?branch=v2.2.1\n    :target: https://coveralls.io/r/dbfixtures/pytest-rabbitmq?branch=v2.2.1\n    :alt: Coverage Status\n\nWhat is this?\n=============\n\nThis is a pytest plugin, that enables you to test your code that relies on a running RabbitMQ Queues.\nIt allows you to specify additional fixtures for RabbitMQ process and client.\n\nHow to use\n==========\n\nPlugin contains two fixtures\n\n* **rabbitmq** - it's a client fixture that has functional scope. After each test, it cleans RabbitMQ, cleans queues and exchanges for more reliable tests.\n* **rabbitmq_proc** - session scoped fixture, that starts RabbitMQ instance at it's first use and stops at the end of the tests.\n\nSimply include one of these fixtures into your tests fixture list.\n\nYou can also create additional rabbitmq client and process fixtures if you'd need to:\n\n\n.. code-block:: python\n\n    from pytest_rabbitmq import factories\n\n    rabbitmq_my_proc = factories.rabbitmq_proc(\n        port=None, logsdir='/tmp')\n    rabbitmq_my = factories.rabbitmq('rabbitmq_my_proc')\n\n.. note::\n\n    Each RabbitMQ process fixture can be configured in a different way than the others through the fixture factory arguments.\n\nConfiguration\n=============\n\nYou can define your settings in three ways, it's fixture factory argument, command line option and pytest.ini configuration option.\nYou can pick which you prefer, but remember that these settings are handled in the following order:\n\n    * ``Fixture factory argument``\n    * ``Command line option``\n    * ``Configuration option in your pytest.ini file``\n\n.. list-table:: Configuration options\n   :header-rows: 1\n\n   * - RabbitMQ option\n     - Fixture factory argument\n     - Command line option\n     - pytest.ini option\n     - Default\n   * - host\n     - host\n     - --rabbitmq-host\n     - rabbitmq_host\n     - 127.0.0.1\n   * - RABBITMQ_NODE_PORT\n     - port\n     - --rabbitmq-port\n     - rabbitmq_port\n     - random\n   * - RABBITMQ_DIST_PORT\n     - distribution_port\n     - --rabbitmq-distribution-port\n     - rabbitmq_distribution_port\n     - random\n   * - rabbitmqctl path\n     - ctl\n     - --rabbitmq-ctl\n     - rabbitmq_ctl\n     - /usr/lib/rabbitmq/bin/rabbitmqctl\n   * - rabbitmq server path\n     - server\n     - --rabbitmq-server\n     - rabbitmq_server\n     - /usr/lib/rabbitmq/bin/rabbitmq-server\n   * - Log directory location\n     - logsdir\n     - --rabbitmq-logsdir\n     - rabbitmq_logsdir\n     - $TMPDIR\n   * - Plugin directory location\n     - plugin_path\n     - --rabbitmq-plugindir\n     - rabbitmq_plugindir\n     - $TMPDIR\n   * - Node name\n     - node\n     - --rabbitmq-node\n     - rabbitmq_node\n     - rabbitmq-test-{port}\n\n\nExample usage:\n\n* pass it as an argument in your own fixture\n\n    .. code-block:: python\n\n        rabbitmq_proc = factories.rabbitmq_proc(port=8888)\n\n* use ``--rabbitmq-port`` command line option when you run your tests\n\n    .. code-block::\n\n        py.test tests --rabbitmq-port=8888\n\n\n* specify your port as ``rabbitmq_port`` in your ``pytest.ini`` file.\n\n    To do so, put a line like the following under the ``[pytest]`` section of your ``pytest.ini``:\n\n    .. code-block:: ini\n\n        [pytest]\n        rabbitmq_port = 8888\n\nPackage resources\n-----------------\n\n* Bug tracker: https://github.com/dbfixtures/pytest-rabbitmq/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbfixtures%2Fpytest-rabbitmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbfixtures%2Fpytest-rabbitmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbfixtures%2Fpytest-rabbitmq/lists"}