{ "info": { "author": "Brett Haydon", "author_email": "brett@haydon.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Plugins", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Testing" ], "description": "nose2django\n======================\n\nA plugin pair for nose2 that runs your django (>=1.4) tests through the nose2 command and also supports django-configurations_ settings management. It lets django initialise the test environment and setup the order of the test suite, but nose2/unittest2 handles the test discovery and execution.\n\n*There is another project called* |django-nose2|_ *which is authored by one of the nose2 devs. It uses the standard django approach of setting an alternative test runner and running via manage.py. I was interested with the move to shift setup.py configuration into setup.cfg and wanted to try that pattern for running tests rather that wrapping configuration into a custom test runner. Modern django has refactored the way a project is initialised which means there is less dependency on using manage.py and django-admin.py as the only possible entry points into your django project.*\n\nInstallation\n--------------\n\n.. code-block:: bash\n\n\t$ pip install nose2django\n\nCreate a nose2.cfg file in your project's root directory (where manage.py is) and register the plugins in the correct order::\n\n [unittest]\n plugins = nose2django.config\n nose2django.nose2django\n\n [django-config]\n always-on = True\n\n # optional settings\n settings = yourproject.settings\n configuration = YourTestConfiguration\n\n [django-runner]\n always-on = True\n\n\nYou can optionally set the `settings` and `configuration` to a django settings module and a django-configurations configuration. It takes precedence over any existing environment.\n\nUsage\n--------\n\nAs per nose2, optionally with either of the django-runner options.\n\n.. code-block:: bash\n\n\t$ nose2 --settings=example.settings.test --configuration=TestSettings\n\t\nPatterns\n------------\nFor django app test driven development of apps you want only as much django settings as required. Create a tests folder in your top level directory (avoid using the name tests - use something like test_yourapp to avoid name clashes), and put a minimal settings file in there and an `__init__.py` file to make it importable. Something like:\n\n.. code-block:: python\n\n\tDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3' }\n }\n\n\tINSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'yourapp',\n )\n\tROOT_URLCONF='yourapp.urls', # if you have urls\n\tSECRET_KEY = '1234'\n\nAcknowledgements\n------------------\n\nnose2django re-uses parts of the existing django test runner code as licensed by django_.\n\n.. _django-configurations: https://github.com/jezdez/django-configurations\n.. _django-nose2: https://github.com/jpellerin/django-nose2\n.. _django: https://raw.github.com/django/django/master/LICENSE\n\n.. |django-nose2| replace:: *django-nose*\n\n.. :changelog:\n\n\nChangelog\n---------\n\nv0.1.2 (2013-4-13)\n^^^^^^^^^^^^^^^^^^^^\n\n- Add South compatibility.\n\nv0.1.1 (2013-4-6)\n^^^^^^^^^^^^^^^^^^^^\n\n- Fix issue with django logging setup when nose -v.\n\nv0.1 (2013-03-29)\n^^^^^^^^^^^^^^^^^^^^\n\n- Initial public (correctly packaged) release. Thanks tox.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bretth/nose2django", "keywords": "nose2\ndjango\ntesting", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "nose2django", "package_url": "https://pypi.org/project/nose2django/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nose2django/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bretth/nose2django" }, "release_url": "https://pypi.org/project/nose2django/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Nose2 plugin to run django tests through nose2 instead of the django test runner.", "version": "0.1.2" }, "last_serial": 795526, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d490f0ea1f4b527755b48486fb1cf13a", "sha256": "586919503a136bec03434702815d6f6d9661423447138521d7260de1d50a043d" }, "downloads": -1, "filename": "nose2django-0.1.tar.gz", "has_sig": false, "md5_digest": "d490f0ea1f4b527755b48486fb1cf13a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4838, "upload_time": "2013-03-29T05:53:12", "url": "https://files.pythonhosted.org/packages/4e/b6/be1cf8ce91c073b76f6a7cfe4693f40242fa30eed5884958596d298648b0/nose2django-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a31bb50593b7729178ff877eb2bbf43d", "sha256": "211395fa7de8ebc15cf83f9c00d6f8c48b7bac1ea9b5980fc95035f3a53e7d31" }, "downloads": -1, "filename": "nose2django-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a31bb50593b7729178ff877eb2bbf43d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4891, "upload_time": "2013-04-06T01:38:19", "url": "https://files.pythonhosted.org/packages/6a/64/485d67e82659eca6c02c742c7adadf10a5b76d30fccfeb6db55c6c1ce92d/nose2django-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "928ac7e26082d4c4bdfd7b0d1342af60", "sha256": "2bef1861830459d48e37338f7a404b684934baf4235fb1b81cb8c39c62adda3a" }, "downloads": -1, "filename": "nose2django-0.1.2.tar.gz", "has_sig": false, "md5_digest": "928ac7e26082d4c4bdfd7b0d1342af60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4849, "upload_time": "2013-04-13T00:58:27", "url": "https://files.pythonhosted.org/packages/97/85/9de984e2b873ba5b8d76b34eb648950211244a73c8703d02cad332bb4682/nose2django-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "928ac7e26082d4c4bdfd7b0d1342af60", "sha256": "2bef1861830459d48e37338f7a404b684934baf4235fb1b81cb8c39c62adda3a" }, "downloads": -1, "filename": "nose2django-0.1.2.tar.gz", "has_sig": false, "md5_digest": "928ac7e26082d4c4bdfd7b0d1342af60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4849, "upload_time": "2013-04-13T00:58:27", "url": "https://files.pythonhosted.org/packages/97/85/9de984e2b873ba5b8d76b34eb648950211244a73c8703d02cad332bb4682/nose2django-0.1.2.tar.gz" } ] }