{ "info": { "author": "Percipient Networks, LLC", "author_email": "support@strongarm.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries", "Topic :: System :: Networking" ], "description": "Graveolens\n##########\n\nThe missing test library for the `Celery`_ Python library. Some of the things graveolens can help with include:\n\n* Provide resultss to Celery task calls without hitting your broker.\n* Ensuring that you know exactly which tasks are called.\n* Easily assert the arguments of task calls.\n* Easily handle results when using ``send_task`` in Celery.\n\n.. _Celery: http://www.celeryproject.org/\n\nThe binomial name for celery is `Apium graveolens`_.\n\n.. _Apium graveolens: https://en.wikipedia.org/wiki/Celery\n\nReturning Results\n=================\n\n.. code-block:: python\n\n from my_app.celery import app\n import graveolens\n\n def test_my_task():\n with graveolens.activate() as celery:\n celery.add('my_app.task', {'done': True, 'status': 'OK'})\n\n result = app.send_task('my_app.task', 'test', id=3)\n\n # The result is an EagerResult from Celery.\n assert result.get() == {'done': True, 'status': 'OK'}\n\n # You can also check ALL the calls that Celery received.\n assert len(celery.calls) == 1\n assert celery.calls[0].name == 'http://twitter.com/api/1/foobar'\n assert celery.calls[0].args == ('test', )\n assert celery.calls[0].kwargs == {'id': 3}\n\nAsserting Celery Calls\n======================\n\nBy default, if a result is added and unused this raises an ``AssertionError``\nwhen the context manager exits, e.g.:\n\n.. code-block:: python\n\n import graveolens\n\n def test_my_task():\n with graveolens.activate() as celery:\n celery.add('my_app.task')\n\n # Assertion will be raised here because 'my_app.task' is never called.\n\nThis can be configured using the ``assert_all_tasks_called`` flag to\n``activate()``.\n\nAdditionally, if a Celery task is called without having a result set-up then\n``graveolens.NotMockedTask`` will be raised.\n\n.. code-block:: python\n\n from my_app.celery import app\n import graveolens\n\n def test_my_task():\n with graveolens.activate() as celery:\n try:\n result = app.send_task('my_app.task', 'test', id=3)\n except graveolens.NotMockedTask:\n # Exception will be raised since my_app.task has no result.\n pass\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/percipient/graveolens", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/percipient/graveolens", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "graveolens", "package_url": "https://pypi.org/project/graveolens/", "platform": "", "project_url": "https://pypi.org/project/graveolens/", "project_urls": { "Download": "https://github.com/percipient/graveolens", "Homepage": "https://github.com/percipient/graveolens" }, "release_url": "https://pypi.org/project/graveolens/0.1.4/", "requires_dist": [ "celery (>3)", "mock (>=2.0.0)" ], "requires_python": "", "summary": "The missing test library for Celery.", "version": "0.1.4" }, "last_serial": 5380891, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bed7d9c18e08fc73ed6ef44d2dc4800d", "sha256": "f762cf9fab28d2ad049821786e0e8c9c821dbae0ab2d6a0a34bfcc82b8b5c449" }, "downloads": -1, "filename": "graveolens-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bed7d9c18e08fc73ed6ef44d2dc4800d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5411, "upload_time": "2016-10-07T14:03:09", "url": "https://files.pythonhosted.org/packages/a8/bd/055b6d6dd0379d27f79681a3a2d61cd02f7125cf88692c4c4b9ce2155473/graveolens-0.1-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5428841168811e4a8006566e3b4491c6", "sha256": "cc16091f2c5b5dc112ee36c5a8a8113200658598c5321c77bddfa0a97d91e88e" }, "downloads": -1, "filename": "graveolens-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5428841168811e4a8006566e3b4491c6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5534, "upload_time": "2016-11-15T14:40:30", "url": "https://files.pythonhosted.org/packages/08/4e/88b9e8e14d4814467b4119c69175b6f958a9ea270f3092662be00c79f45b/graveolens-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "42e7d0b4eee7448550e9a67743087f2d", "sha256": "c14932c8c43f633c1f99669b219ce0e4d9f7f027d896e7cebe76fad3e5d0c77d" }, "downloads": -1, "filename": "graveolens-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "42e7d0b4eee7448550e9a67743087f2d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4431, "upload_time": "2018-11-29T13:45:25", "url": "https://files.pythonhosted.org/packages/35/fa/5e949d9e977fd46d577e8b27372c6910c7f6dadea28ca16b64ce74fc3605/graveolens-0.1.2-py2.py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "082bd71a9caa4e423fe9cc96ecae4e5b", "sha256": "2cffdb490c7519b1fa36c229091ebbc411047a27f9defba742faff4edd92b359" }, "downloads": -1, "filename": "graveolens-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "082bd71a9caa4e423fe9cc96ecae4e5b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4441, "upload_time": "2019-01-09T05:27:26", "url": "https://files.pythonhosted.org/packages/45/02/8b504ada5d0b2a789200bfe8a43af251c6500da2b0866b3df49d8aaf4da8/graveolens-0.1.3-py2.py3-none-any.whl" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "b75a8edc8d39b788dbd23ee68b0cc0a4", "sha256": "d4311cfb664157bbe50e3074ce3ad2421ce69e0d57d815c9af11994254b45547" }, "downloads": -1, "filename": "graveolens-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b75a8edc8d39b788dbd23ee68b0cc0a4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4436, "upload_time": "2019-06-10T12:32:09", "url": "https://files.pythonhosted.org/packages/79/60/f7767ce467f24d6787bfc44cc3b6cd199bac016c2fedd0a63dfcafa25200/graveolens-0.1.4-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b75a8edc8d39b788dbd23ee68b0cc0a4", "sha256": "d4311cfb664157bbe50e3074ce3ad2421ce69e0d57d815c9af11994254b45547" }, "downloads": -1, "filename": "graveolens-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b75a8edc8d39b788dbd23ee68b0cc0a4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4436, "upload_time": "2019-06-10T12:32:09", "url": "https://files.pythonhosted.org/packages/79/60/f7767ce467f24d6787bfc44cc3b6cd199bac016c2fedd0a63dfcafa25200/graveolens-0.1.4-py2.py3-none-any.whl" } ] }