{ "info": { "author": "Alex Hayes", "author_email": "alex@alution.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development", "Topic :: Software Development :: Testing" ], "description": "=================\ndjango-async-test\n=================\n\n`asyncio`_ unit tests with `Django`_ transactional support.\n\nIt supports Django 1.8+ for Python versions 3.5+ and uses `asynctest`_ under the\ncovers to provide support for easily mocking coroutines.\n\n.. image:: https://travis-ci.org/alexhayes/django-async-test.png?branch=master\n :target: https://travis-ci.org/alexhayes/django-async-test\n :alt: Build Status\n\n.. image:: https://landscape.io/github/alexhayes/django-async-test/master/landscape.png\n :target: https://landscape.io/github/alexhayes/django-async-test/\n :alt: Code Health\n\n.. image:: https://codecov.io/github/alexhayes/django-async-test/coverage.svg?branch=master\n :target: https://codecov.io/github/alexhayes/django-async-test?branch=master\n :alt: Code Coverage\n\n.. image:: https://readthedocs.org/projects/django-async-test/badge/\n :target: http://django-async-test.readthedocs.org/en/latest/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/v/django-async-test.svg\n :target: https://pypi.python.org/pypi/django-async-test\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/django-async-test.svg\n :target: https://pypi.python.org/pypi/django-async-test/\n :alt: Supported Python versions\n\n.. image:: https://img.shields.io/pypi/dd/django-async-test.svg\n :target: https://pypi.python.org/pypi/django-async-test/\n :alt: Downloads\n\n\nDocs\n====\n\nAvailable at `django-async-test.readthedocs.org`_\n\n\nInstallation\n============\n\nYou can install django-async-test either via the Python Package Index (PyPI)\nor from github.\n\nTo install using pip;\n\n.. code-block:: bash\n\n $ pip install django-async-test\n\nFrom github;\n\n.. code-block:: bash\n\n $ pip install git+https://github.com/alexhayes/django-async-test.git\n\n\nUsage\n=====\n\n`asynctest.TestCase`_ does a great job of mocking coroutines however if you're\nwriting tests that manipulate the database in Django you'll most likely want to\nensure that things are cleaned up after your test.\n\nWith ``django_async_test.TestCase`` you have the coroutine support of\n`asynctest.TestCase`_ but with the transaction support of Django's\n`django.test.TestCase`_.\n\n.. code-block:: python\n\n import django_async_test\n\n class MyTestCase(django_async_test.TestCase):\n\n @django_async_test.patch('myapp.my_coroutine')\n def test_foo(self, MockMyCoroutine):\n\n # Mock our coroutine.\n MockMyCoroutine.return_value = 'Hello World'\n\n # Create an instance of MyModel\n MyModel.objects.create(...)\n\n ...\n ...\n\n\nIn the above example, the test is run inside a transaction by Django's TestCase,\nthus the creation of a MyModel will be rolled back, cleaning up the database.\n\nAlso, our co-routine will be patched correctly by asynctest.\n\n\nLicense\n=======\n\nThis software is licensed under the `MIT License`. See the LICENSE_ file.\n\n\nAuthor\n======\n\nAlex Hayes \n\n.. _Django: https://www.djangoproject.com/\n.. _LICENSE: https://github.com/alexhayes/django-async-test/blob/master/LICENSE\n.. _asyncio: https://docs.python.org/3/library/asyncio.html\n.. _asynctest: https://pypi.python.org/pypi/asynctest\n.. _django-async-test.readthedocs.org: http://django-async-test.readthedocs.org/en/latest/\n.. _django.test.TestCase: https://docs.djangoproject.com/en/1.9/topics/testing/tools/#django.test.TestCase\n.. _asynctest.TestCase: http://asynctest.readthedocs.org/en/latest/asynctest.case.html#asynctest.TestCase", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/alexhayes/django-async-test", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-async-test", "package_url": "https://pypi.org/project/django-async-test/", "platform": "any", "project_url": "https://pypi.org/project/django-async-test/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/alexhayes/django-async-test" }, "release_url": "https://pypi.org/project/django-async-test/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "asyncio unit tests with Django transactional support.", "version": "0.2.2" }, "last_serial": 2107321, "releases": { "0.1.6": [ { "comment_text": "", "digests": { "md5": "a8a0ea5d6d533fa92595b9b0af2e25a9", "sha256": "db85a75403275d131289ce42b23f4d59823e6f847be53b4eb365e4975a6e3f4e" }, "downloads": -1, "filename": "django-async-test-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a8a0ea5d6d533fa92595b9b0af2e25a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 869057, "upload_time": "2015-12-16T11:33:33", "url": "https://files.pythonhosted.org/packages/77/b5/4de1f6f387a730f201e6424fc377543f921f3839afb2779c8c12c80ea7a2/django-async-test-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "9658ec1eed902124e6194832d1cf20b1", "sha256": "dc81a04c23abd9559caee070f3b5e5dca1f7148d8bdbdd86cd32dcc4b9c44c56" }, "downloads": -1, "filename": "django-async-test-0.1.7.tar.gz", "has_sig": false, "md5_digest": "9658ec1eed902124e6194832d1cf20b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 869069, "upload_time": "2015-12-16T11:51:01", "url": "https://files.pythonhosted.org/packages/42/db/cb4531641813f4023ddd855029165ab0c1d48c0a1ae2523bff5b4d612a99/django-async-test-0.1.7.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d4ec53538ccb2beaad1bc3c66840e796", "sha256": "6e24f31381c132dd9445f8502dde72f832ea0a4ba72e005a172f2036997f22c2" }, "downloads": -1, "filename": "django-async-test-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d4ec53538ccb2beaad1bc3c66840e796", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 869840, "upload_time": "2015-12-16T21:08:07", "url": "https://files.pythonhosted.org/packages/f4/fa/50210356f776f2514f45526bb1cde12890de66438922f3047d428f96e33d/django-async-test-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f65047382c12e7978fca32476e2cd115", "sha256": "ba0d4ec8dfc5239a1541c486c0e81f7f196fe73fcd37b0aea0b838ef84d849f6" }, "downloads": -1, "filename": "django-async-test-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f65047382c12e7978fca32476e2cd115", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 869774, "upload_time": "2015-12-16T21:17:38", "url": "https://files.pythonhosted.org/packages/99/98/861d2679657d53f02e09aeaffdb3ea1f2e35ec10b90b696489b693fea037/django-async-test-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "2c999bdc9f7750e8b0328582e74275c2", "sha256": "f5bab436d9beaab2d699e6cf81cf25a30da68cd56bc1fd459bf151262d24179d" }, "downloads": -1, "filename": "django-async-test-0.2.2.tar.gz", "has_sig": false, "md5_digest": "2c999bdc9f7750e8b0328582e74275c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 873696, "upload_time": "2016-05-09T21:10:52", "url": "https://files.pythonhosted.org/packages/38/c4/c277ce6f19313c6ab52de220bc618409a49a5a53f8185b667fbab2a25f2d/django-async-test-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2c999bdc9f7750e8b0328582e74275c2", "sha256": "f5bab436d9beaab2d699e6cf81cf25a30da68cd56bc1fd459bf151262d24179d" }, "downloads": -1, "filename": "django-async-test-0.2.2.tar.gz", "has_sig": false, "md5_digest": "2c999bdc9f7750e8b0328582e74275c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 873696, "upload_time": "2016-05-09T21:10:52", "url": "https://files.pythonhosted.org/packages/38/c4/c277ce6f19313c6ab52de220bc618409a49a5a53f8185b667fbab2a25f2d/django-async-test-0.2.2.tar.gz" } ] }