Name | pytest-rabbitmq JSON |
Version |
3.1.1
JSON |
| download |
home_page | None |
Summary | RabbitMQ process and client fixtures for pytest |
upload_time | 2024-10-15 11:29:26 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. |
keywords |
tests
pytest
fixture
rabbitmq
messsage queue
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
.. image:: https://raw.githubusercontent.com/ClearcodeHQ/pytest-rabbitmq/master/logo.png
:width: 100px
:height: 100px
pytest-rabbitmq
===============
.. image:: https://img.shields.io/pypi/v/pytest-rabbitmq.svg
:target: https://pypi.python.org/pypi/pytest-rabbitmq/
:alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/wheel/pytest-rabbitmq.svg
:target: https://pypi.python.org/pypi/pytest-rabbitmq/
:alt: Wheel Status
.. image:: https://img.shields.io/pypi/pyversions/pytest-rabbitmq.svg
:target: https://pypi.python.org/pypi/pytest-rabbitmq/
:alt: Supported Python Versions
.. image:: https://img.shields.io/pypi/l/pytest-rabbitmq.svg
:target: https://pypi.python.org/pypi/pytest-rabbitmq/
:alt: License
Package status
--------------
.. image:: https://travis-ci.org/ClearcodeHQ/pytest-rabbitmq.svg?branch=v2.2.1
:target: https://travis-ci.org/ClearcodeHQ/pytest-rabbitmq
:alt: Tests
.. image:: https://coveralls.io/repos/ClearcodeHQ/pytest-rabbitmq/badge.png?branch=v2.2.1
:target: https://coveralls.io/r/ClearcodeHQ/pytest-rabbitmq?branch=v2.2.1
:alt: Coverage Status
What is this?
=============
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.
How to use
==========
Plugin contains two fixtures
* **rabbitmq** - it's a client fixture that has functional scope. After each test, it cleans RabbitMQ, cleans queues and exchanges for more reliable tests.
* **rabbitmq_proc** - session scoped fixture, that starts RabbitMQ instance at it's first use and stops at the end of the tests.
Simply include one of these fixtures into your tests fixture list.
You can also create additional rabbitmq client and process fixtures if you'd need to:
.. code-block:: python
from pytest_rabbitmq import factories
rabbitmq_my_proc = factories.rabbitmq_proc(
port=None, logsdir='/tmp')
rabbitmq_my = factories.rabbitmq('rabbitmq_my_proc')
.. note::
Each RabbitMQ process fixture can be configured in a different way than the others through the fixture factory arguments.
Configuration
=============
You can define your settings in three ways, it's fixture factory argument, command line option and pytest.ini configuration option.
You can pick which you prefer, but remember that these settings are handled in the following order:
* ``Fixture factory argument``
* ``Command line option``
* ``Configuration option in your pytest.ini file``
.. list-table:: Configuration options
:header-rows: 1
* - RabbitMQ option
- Fixture factory argument
- Command line option
- pytest.ini option
- Default
* - host
- host
- --rabbitmq-host
- rabbitmq_host
- 127.0.0.1
* - RABBITMQ_NODE_PORT
- port
- --rabbitmq-port
- rabbitmq_port
- random
* - RABBITMQ_DIST_PORT
- distribution_port
- --rabbitmq-distribution-port
- rabbitmq_distribution_port
- random
* - rabbitmqctl path
- ctl
- --rabbitmq-ctl
- rabbitmq_ctl
- /usr/lib/rabbitmq/bin/rabbitmqctl
* - rabbitmq server path
- server
- --rabbitmq-server
- rabbitmq_server
- /usr/lib/rabbitmq/bin/rabbitmq-server
* - Log directory location
- logsdir
- --rabbitmq-logsdir
- rabbitmq_logsdir
- $TMPDIR
* - Plugin directory location
- plugin_path
- --rabbitmq-plugindir
- rabbitmq_plugindir
- $TMPDIR
* - Node name
- node
- --rabbitmq-node
- rabbitmq_node
- rabbitmq-test-{port}
Example usage:
* pass it as an argument in your own fixture
.. code-block:: python
rabbitmq_proc = factories.rabbitmq_proc(port=8888)
* use ``--rabbitmq-port`` command line option when you run your tests
.. code-block::
py.test tests --rabbitmq-port=8888
* specify your port as ``rabbitmq_port`` in your ``pytest.ini`` file.
To do so, put a line like the following under the ``[pytest]`` section of your ``pytest.ini``:
.. code-block:: ini
[pytest]
rabbitmq_port = 8888
Package resources
-----------------
* Bug tracker: https://github.com/ClearcodeHQ/pytest-rabbitmq/issues
Raw data
{
"_id": null,
"home_page": null,
"name": "pytest-rabbitmq",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "tests, pytest, fixture, rabbitmq, messsage queue",
"author": null,
"author_email": "Grzegorz \u015aliwi\u0144ski <fizyk+pypi@fizyk.dev>",
"download_url": "https://files.pythonhosted.org/packages/82/93/bba7413a9a30394621a4e3cc1e139e4738214ec55253e1ba71e6513c1715/pytest_rabbitmq-3.1.1.tar.gz",
"platform": null,
"description": ".. image:: https://raw.githubusercontent.com/ClearcodeHQ/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/ClearcodeHQ/pytest-rabbitmq.svg?branch=v2.2.1\n :target: https://travis-ci.org/ClearcodeHQ/pytest-rabbitmq\n :alt: Tests\n\n.. image:: https://coveralls.io/repos/ClearcodeHQ/pytest-rabbitmq/badge.png?branch=v2.2.1\n :target: https://coveralls.io/r/ClearcodeHQ/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/ClearcodeHQ/pytest-rabbitmq/issues\n",
"bugtrack_url": null,
"license": "GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, \"this License\" refers to version 3 of the GNU Lesser General Public License, and the \"GNU GPL\" refers to version 3 of the GNU General Public License. \"The Library\" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An \"Application\" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A \"Combined Work\" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the \"Linked Version\". The \"Minimal Corresponding Source\" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The \"Corresponding Application Code\" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License \"or any later version\" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.",
"summary": "RabbitMQ process and client fixtures for pytest",
"version": "3.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/ClearcodeHQ/pytest-rabbitmq/issues",
"Changelog": "https://github.com/ClearcodeHQ/pytest-rabbitmq/blob/v3.1.1/CHANGES.rst",
"Source": "https://github.com/ClearcodeHQ/pytest-rabbitmq"
},
"split_keywords": [
"tests",
" pytest",
" fixture",
" rabbitmq",
" messsage queue"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d8bb407a56cea9075f1902bb7881c4cebde9ce106aac3ebc68bc6c27b596823a",
"md5": "282c6f3fc72246af870968a5d4dd6c46",
"sha256": "7d8e2db235bc43ebee7a127848af9a565e81c0cdc97409062700ac58751b8710"
},
"downloads": -1,
"filename": "pytest_rabbitmq-3.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "282c6f3fc72246af870968a5d4dd6c46",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 29993,
"upload_time": "2024-10-15T11:29:25",
"upload_time_iso_8601": "2024-10-15T11:29:25.377667Z",
"url": "https://files.pythonhosted.org/packages/d8/bb/407a56cea9075f1902bb7881c4cebde9ce106aac3ebc68bc6c27b596823a/pytest_rabbitmq-3.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8293bba7413a9a30394621a4e3cc1e139e4738214ec55253e1ba71e6513c1715",
"md5": "88457e85e8bf29944d927742366771ea",
"sha256": "3e2650040a0d70bdd44dee5ad6e05443126a7e0c195f719aa667c447320a9b4d"
},
"downloads": -1,
"filename": "pytest_rabbitmq-3.1.1.tar.gz",
"has_sig": false,
"md5_digest": "88457e85e8bf29944d927742366771ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 30976,
"upload_time": "2024-10-15T11:29:26",
"upload_time_iso_8601": "2024-10-15T11:29:26.423598Z",
"url": "https://files.pythonhosted.org/packages/82/93/bba7413a9a30394621a4e3cc1e139e4738214ec55253e1ba71e6513c1715/pytest_rabbitmq-3.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-15 11:29:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ClearcodeHQ",
"github_project": "pytest-rabbitmq",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "pytest-rabbitmq"
}