{ "info": { "author": "Clearcode - The A Room", "author_email": "thearoom@clearcode.cc", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://raw.githubusercontent.com/ClearcodeHQ/pytest-redis/master/logo.png\n :width: 100px\n :height: 100px\n\npytest-redis\n============\n\n.. image:: https://img.shields.io/pypi/v/pytest-redis.svg\n :target: https://pypi.python.org/pypi/pytest-redis/\n :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/wheel/pytest-redis.svg\n :target: https://pypi.python.org/pypi/pytest-redis/\n :alt: Wheel Status\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-redis.svg\n :target: https://pypi.python.org/pypi/pytest-redis/\n :alt: Supported Python Versions\n\n.. image:: https://img.shields.io/pypi/l/pytest-redis.svg\n :target: https://pypi.python.org/pypi/pytest-redis/\n :alt: License\n\nPackage status\n--------------\n\n.. image:: https://travis-ci.org/ClearcodeHQ/pytest-redis.svg?branch=v2.0.0\n :target: https://travis-ci.org/ClearcodeHQ/pytest-redis\n :alt: Tests\n\n.. image:: https://coveralls.io/repos/ClearcodeHQ/pytest-redis/badge.svg?branch=v2.0.0\n :target: https://coveralls.io/r/ClearcodeHQ/pytest-redis?branch=v2.0.0\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 Redis database.\nIt allows you to specify additional fixtures for Redis process and client.\n\nHow to use\n==========\n\nPlugin contains three fixtures\n\n* **redisdb** - it's a client fixture that has functional scope. After each test, it cleans Redis database for more reliable tests.\n* **redis_proc** - session scoped fixture, that starts Redis instance at it's first use and stops at the end of the tests.\n* **redis_nooproc** - a nooprocess fixture, that's connecting to already running redis\n\nSimply include one of these fixtures into your tests fixture list.\n\nYou can also create additional redis client and process fixtures if you'd need to:\n\n\n.. code-block:: python\n\n from pytest_redis import factories\n\n redis_my_proc = factories.redis_proc(port=None, logsdir='/tmp')\n redis_my = factories.redisdb('redis_my_proc')\n\n.. note::\n\n Each Redis process fixture can be configured in a different way than the others through the fixture factory arguments.\n\n\nConnecting to already existing redis database\n---------------------------------------------\n\nSome projects are using already running redis servers (ie on docker instances).\nIn order to connect to them, one would be using the ``redis_nooproc`` fixture.\n\n.. code-block:: python\n\n redis_external = factories.redisdb('redis_nooproc')\n\nBy default the ``redis_nooproc`` fixture would connect to postgresql instance using **6379** port. Standard configuration options apply to it.\n\nThese are the configuration options that are working on all levels with the ``redis_nooproc`` fixture:\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 * - Redis server option\n - Fixture factory argument\n - Command line option\n - pytest.ini option\n - Noop process fixture\n - Default\n * - executable\n - executable\n - --redis-exec\n - redis_exec\n - -\n - /usr/bin/redis-server\n * - host\n - host\n - --redis-host\n - redis_host\n - host\n - 127.0.0.1\n * - port\n - port\n - --redis-port\n - redis_port\n - port\n - random\n * - connection timeout\n - timeout\n - --redis-timeout\n - redis_timeout\n - -\n - 30\n * - number of databases\n - db_count\n - --redis-db-count\n - redis_db_count\n - -\n - 8\n * - Whether to enable logging to the system logger\n - syslog\n - --redis-syslog\n - redis_syslog\n - -\n - False\n * - Log directory location\n - logsdir\n - --redis-logsdir\n - redis_logsdir\n - -\n - $TMPDIR\n * - Redis log verbosity level\n - loglevel\n - --redis-loglevel\n - redis_loglevel\n - -\n - notice\n * - Compress dump files\n - compress\n - --redis-compress\n - redis_compress\n - -\n - True\n * - Add checksum to RDB files\n - checksum\n - --redis-rdbcompress\n - redis_rdbchecksum\n - -\n - False\n * - Save configuration\n - save\n - --redis-save\n - redis_save\n - -\n - \"\"\n\nExample usage:\n\n* pass it as an argument in your own fixture\n\n .. code-block:: python\n\n redis_proc = factories.redis_proc(port=8888)\n\n* use ``--redis-port`` command line option when you run your tests\n\n .. code-block::\n\n py.test tests --redis-port=8888\n\n\n* specify your port as ``redis_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 redis_port = 8888\n\nOptions below are for configuring redis client fixture.\n\n+---------------------+--------------------------+---------------------+-------------------+---------+\n| Redis client option | Fixture factory argument | Command line option | pytest.ini option | Default |\n+=====================+==========================+=====================+===================+=========+\n| decode_response | decode | --redis-decode | redis_decode | False |\n+---------------------+--------------------------+---------------------+-------------------+---------+\n\nPackage resources\n-----------------\n\n* Bug tracker: https://github.com/ClearcodeHQ/pytest-redis/issues\n\n\n\nCHANGELOG\n=========\n\n2.0.0\n-------\n\n- [feature] ability to properly connect to already existing postgresql server using ``redis_nooproc`` fixture.\n- [enhancement] dropped support for python 2.7\n\n1.3.2\n-------\n\n- [bugfix] - close file descriptor when reading redis version (by brunsgaard)\n\n1.3.1\n-------\n\n- [bugfix] do not run redis explicitly with shell=True\n\n1.3.0\n-------\n\n- [enhancement] RedisExecutor now provides attribute with path to unixsocket\n- [enhancement] redis client fixture now connects to redis through unixsocket by default\n- [enhancement] Version check got moved to executor, to be run just before starting Redis Server\n- [feature] ability to configure decode_responses for redis client in command line, pytest.ini or factory argument.\n- [bugfix] set decode_responses to False, same as StrictRedis default\n- [enhancement] ability to change decode_responses value\n\n1.2.1\n-------\n\n- [bugfix] raise specific error in case the redis executable path has been misconfigured or does not exists\n\n1.2.0\n-------\n\n- [feature] ability to configure syslog-enabled for redis in command line, pytest.ini or factory argument.\n- [feature] ability to configure rdbchecksum for redis in command line, pytest.ini or factory argument.\n- [feature] ability to configure rdbcompression for redis in command line, pytest.ini or factory argument.\n- [ehnacement] - RedisExecutor handling parameters and their translation to redis values if needed.\n- [feature] ability to configure save option for redis in command line, pytest.ini or factory argument.\n\n1.1.1\n-------\n- [cleanup] removed path.py dependency\n\n1.1.0\n-------\n\n- [feature] - migrate usage of getfuncargvalue to getfixturevalue. require at least pytest 3.0.0\n\n1.0.0\n-------\n\n- [enhancements] removed the possibility to pass the custom config. No need to include one in package now.\n- [enhancements] command line, pytest.ini and fixture factory options for setting custom number of databases in redis\n- [enhancements] command line, pytest.ini and fixture factory options for redis log verbosity\n- [enhancements] command line, pytest.ini and fixture factory options for modifying connection timeout\n- [enhancements] command line and pytest.ini options for modifying executable\n- [enhancements] command line and pytest.ini options for modifying host\n- [enhancements] command line and pytest.ini options for modifying port\n- [enhancements] command line and pytest.ini options for modifying logs directory destination\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ClearcodeHQ/pytest-redis", "keywords": "tests py.test pytest fixture redis", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "pytest-redis", "package_url": "https://pypi.org/project/pytest-redis/", "platform": "", "project_url": "https://pypi.org/project/pytest-redis/", "project_urls": { "Homepage": "https://github.com/ClearcodeHQ/pytest-redis" }, "release_url": "https://pypi.org/project/pytest-redis/2.0.0/", "requires_dist": [ "pytest (>=3.0.0)", "mirakuru (>=0.2)", "port-for (>=0.3.1)", "redis", "pytest-cov ; extra == 'tests'", "pytest-xdist ; extra == 'tests'", "Mock ; extra == 'tests'" ], "requires_python": ">=3.5", "summary": "Redis fixtures and fixture factories for Pytest.", "version": "2.0.0" }, "last_serial": 5979096, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1aa2ac14c1dfe9c50e6322149321e025", "sha256": "379eec2174447e5defac39efc5651d3d568b3405109432ee19fe891c25bc4845" }, "downloads": -1, "filename": "pytest_redis-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1aa2ac14c1dfe9c50e6322149321e025", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12099, "upload_time": "2016-12-06T23:06:57", "url": "https://files.pythonhosted.org/packages/0e/e8/c21679ecf95cebee0a53e9643bb67945c75158fac19cdc479cdd29849cbf/pytest_redis-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41aefc6e137487c5e5ceb40e6255312a", "sha256": "416ac30c1a6d2b0247af055ba198a111a7f85372461b7644fc944c6c75f0081b" }, "downloads": -1, "filename": "pytest-redis-1.0.0.tar.gz", "has_sig": false, "md5_digest": "41aefc6e137487c5e5ceb40e6255312a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8671, "upload_time": "2016-12-06T23:06:59", "url": "https://files.pythonhosted.org/packages/eb/08/936fe0617b0b0a713565be2a1790ebba0906d7aaa5092d9bbdfbb16cbbe8/pytest-redis-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "fd18139f8a2d8724fff3a2dce8cdc54b", "sha256": "73e4b797d89558e3cff901c7d7f824af34d88ce8aad77ee1de1542f65ce0f5c7" }, "downloads": -1, "filename": "pytest_redis-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fd18139f8a2d8724fff3a2dce8cdc54b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12214, "upload_time": "2016-12-07T22:22:28", "url": "https://files.pythonhosted.org/packages/75/8a/47ca9739e4e3e35eb9c68bf20667a1238502f891d261488e32018083e035/pytest_redis-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed873abd62477e87bc7efc0cc83a9d6c", "sha256": "2d3ea11e971a3739f4c8cab2eb20bc07a5c57a14ed24d8f0122ee28a9e6cadad" }, "downloads": -1, "filename": "pytest-redis-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ed873abd62477e87bc7efc0cc83a9d6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8724, "upload_time": "2016-12-07T22:22:30", "url": "https://files.pythonhosted.org/packages/87/95/87601ae896cead01d44938aca0c919ec764f9562cd09f1386099b72db93a/pytest-redis-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "abc5faf3931700cd33bd26e81c76f410", "sha256": "4a6515c609b9d7233c748d3bb13349afd3225d310dacf168c45da59d233a8b9c" }, "downloads": -1, "filename": "pytest_redis-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "abc5faf3931700cd33bd26e81c76f410", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12290, "upload_time": "2017-01-23T22:13:10", "url": "https://files.pythonhosted.org/packages/3e/20/c6ac096e6e51588919dbaf8c56caab56f241db124a3b199f21126a2fc1bb/pytest_redis-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49e8857f1c6381f9b5ec8982c030c850", "sha256": "ce6c3813b774ae32b89c9087e6240f2dcadf3ee218f06cac7c5db46773886d35" }, "downloads": -1, "filename": "pytest-redis-1.1.1.tar.gz", "has_sig": false, "md5_digest": "49e8857f1c6381f9b5ec8982c030c850", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8849, "upload_time": "2017-01-23T22:13:12", "url": "https://files.pythonhosted.org/packages/5b/6e/1734595c73032017b4a88816f3a4dad98d8c8be4d1a7aee5fd55803ac026/pytest-redis-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "1f7189a5203a03c2dfe79ef2f7279e87", "sha256": "4fd4c7b82a8f5f82c0b371e64809a22051c8f496b77a8dc5871e0002430c3fc9" }, "downloads": -1, "filename": "pytest_redis-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1f7189a5203a03c2dfe79ef2f7279e87", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14688, "upload_time": "2017-03-10T22:10:31", "url": "https://files.pythonhosted.org/packages/9c/f8/ce5e72128481b5f608e9cdaddaa60fb5ffb94e0be36e0416fa4aef759661/pytest_redis-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5259bb9e91179b8c9e2116c53dec410a", "sha256": "00650dcd0dc42932aa9608e668ed89ccad79282454b3f720a94e80ea2d796e8f" }, "downloads": -1, "filename": "pytest-redis-1.2.0.tar.gz", "has_sig": false, "md5_digest": "5259bb9e91179b8c9e2116c53dec410a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11040, "upload_time": "2017-03-10T22:10:33", "url": "https://files.pythonhosted.org/packages/d1/ad/4e777619a0ae6ebddafcaad7fc1c0822c8b85ee4c9d556f76b9a34cedcc1/pytest-redis-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "17c53c8870e58cd184dfd90a7bbc2583", "sha256": "a24d1ca6f70d59df78e3a016e5756a7d8009b91e803633423453075a4ea2f489" }, "downloads": -1, "filename": "pytest_redis-1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "17c53c8870e58cd184dfd90a7bbc2583", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14797, "upload_time": "2017-04-04T15:10:24", "url": "https://files.pythonhosted.org/packages/56/6c/d7e8ec31552fe3a2394cea98176401837df2de597e091213ae4d6e580454/pytest_redis-1.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "413076d2a23e18a35668ccd1c5c8a073", "sha256": "c11d013033f6332d575611c815bdad2100e7790d4b320f302a3cf98bc83038e2" }, "downloads": -1, "filename": "pytest-redis-1.2.1.tar.gz", "has_sig": false, "md5_digest": "413076d2a23e18a35668ccd1c5c8a073", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11140, "upload_time": "2017-04-04T15:10:26", "url": "https://files.pythonhosted.org/packages/1a/47/72dc1fb04eadcd7677581060f8f22a56d2b5eca52a17995a7ab2ab2ea0a4/pytest-redis-1.2.1.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "286c749abd7ec4b14fd7a9064cd07908", "sha256": "3aed6ce10c7104fadc7ed6805af7fb2e3951895b2fe590bb6eba35e3b3e02edd" }, "downloads": -1, "filename": "pytest_redis-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "286c749abd7ec4b14fd7a9064cd07908", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15668, "upload_time": "2017-04-10T14:17:30", "url": "https://files.pythonhosted.org/packages/01/52/1167264172f1be9d133838de79ed5356f47f2b9a2d8c879bfa7b43fef212/pytest_redis-1.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "586f26453eb0e210e6daef82dd3afa12", "sha256": "a667c56969e6fd0952404c85110068a4bbd7bfa4eed1e4d2fe2db02d8d57f232" }, "downloads": -1, "filename": "pytest-redis-1.3.0.tar.gz", "has_sig": false, "md5_digest": "586f26453eb0e210e6daef82dd3afa12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11767, "upload_time": "2017-04-10T14:17:32", "url": "https://files.pythonhosted.org/packages/4e/a0/82388f62173f38cc70c38319562f351154d77571fc229ee4de4698ba7e47/pytest-redis-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "18ac83e369d60e60c3a127397b82eb09", "sha256": "cd3019fddb3b05c4041808485ea41d5499a607048b43e39d6c506e0df6e83600" }, "downloads": -1, "filename": "pytest_redis-1.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "18ac83e369d60e60c3a127397b82eb09", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15705, "upload_time": "2017-04-19T20:05:54", "url": "https://files.pythonhosted.org/packages/06/a2/4a19c01163f65861d985e51364b1620d979d13dfabbf80d402e8c188753f/pytest_redis-1.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2bb0a985efa2b46139bbdacd13a203ba", "sha256": "6db64e9528282cd06c9d8b2a9966c97efc28d0b6e2d18c79104e8ba428aaf9e7" }, "downloads": -1, "filename": "pytest-redis-1.3.1.tar.gz", "has_sig": false, "md5_digest": "2bb0a985efa2b46139bbdacd13a203ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11807, "upload_time": "2017-04-19T20:05:55", "url": "https://files.pythonhosted.org/packages/b3/a8/b45d1894cb9091980c672a4325cfc0ef3eee94eada10eaca46d051160122/pytest-redis-1.3.1.tar.gz" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "d52921b8ea8e2dc8d06bbaaf528e4bc1", "sha256": "d7c49de4bafffa30134a2f996bd486c9452fbeb9228394a5c4ddf0e1dcf52c83" }, "downloads": -1, "filename": "pytest_redis-1.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d52921b8ea8e2dc8d06bbaaf528e4bc1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15797, "upload_time": "2017-05-28T20:58:51", "url": "https://files.pythonhosted.org/packages/5b/26/dee2377b6f9c563bbf98e411cd1046ed8e012e1f10252dba71be88ed29c1/pytest_redis-1.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "98426163eab8b8c4682601bb51d9a616", "sha256": "c1598327dc70848ff11b5eb5dd383398ffb35b1f2ada94fd1b5230320929e111" }, "downloads": -1, "filename": "pytest-redis-1.3.2.tar.gz", "has_sig": false, "md5_digest": "98426163eab8b8c4682601bb51d9a616", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11887, "upload_time": "2017-05-28T20:58:53", "url": "https://files.pythonhosted.org/packages/67/eb/8862ec4452369d76d0beee9bbe48ba91a0c1b0fa429a230776b257faa1ae/pytest-redis-1.3.2.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "f6497a677dd5866d55d6de59efa81650", "sha256": "725041832a679d0fe190b7d789505b26a3ae8edcc5dc6ab1aafb1bdce8265c5f" }, "downloads": -1, "filename": "pytest_redis-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f6497a677dd5866d55d6de59efa81650", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 28380, "upload_time": "2019-10-15T19:44:16", "url": "https://files.pythonhosted.org/packages/22/62/5dead98f45111b9f54419ffdffe0cacccecf3eca9c9840e9ed666d01c0c8/pytest_redis-2.0.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f6497a677dd5866d55d6de59efa81650", "sha256": "725041832a679d0fe190b7d789505b26a3ae8edcc5dc6ab1aafb1bdce8265c5f" }, "downloads": -1, "filename": "pytest_redis-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f6497a677dd5866d55d6de59efa81650", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 28380, "upload_time": "2019-10-15T19:44:16", "url": "https://files.pythonhosted.org/packages/22/62/5dead98f45111b9f54419ffdffe0cacccecf3eca9c9840e9ed666d01c0c8/pytest_redis-2.0.0-py3-none-any.whl" } ] }