{ "info": { "author": "Stephen McDonald", "author_email": "stephen.mc@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Site Management" ], "description": "django-shotgun\n==============\n\nCreated by `Stephen McDonald `_\n\n``django-shotgun`` is a Django application that provides the ability\nto validate HTTP status codes across your entire Django application.\n``django-shotgun`` consists of two parts, a `management command`_\ncalled ``load_shotgun`` that prepares ``django-shotgun`` with a\nsnapshot of your database to use in the `Django test case`_, and the\ntest case itself which spiders your Django site testing for valid HTTP\nstatus codes for every URL it finds.\n\nInstallation\n============\n\nAssuming you have `pip`_ installed, the easiest method is to install\ndirectly from pypi by running the following command::\n\n $ pip install -U django-shotgun\n\nOtherwise you can check out the source directly and install it via::\n\n $ python setup.py install\n\nOnce installed you can then add ``django_shotgun`` to your\n``INSTALLED_APPS``.\n\nShotgun Loading\n===============\n\n``django-shotgun`` is most effective when used in conjunction with\nreal data. This is in contrast to the approach a Django test case will\ntake where it purposely does not use the project's real database to\nrun tests. ``django-shotgun`` deals with this by providing a\nmanagement command called ``load_shotgun`` which dumps the contents of\nyour database to a fixture called ``shotgun.json``. Under the hood,\n``load_shotgun`` extends the built-in `dumpdata`_ command and supports\nthe same options, with one extra option called ``path`` which allows\nyou to define where the fixture file should be saved to::\n\n $ python manage.py load_shotgun --path=/path/to/fixtures/\n\nIf the ``path`` option is omitted, the fixture file will be saved to\nthe root of the current project.\n\nShotgun Firing\n==============\n\nThe ``django-shotgun`` test case is a standard Django test case and\ncan therefore be run by calling the built-in ``test`` management\ncommand::\n\n $ python manage.py test\n\nThe ``django-shotgun`` test case will first test the URL ``/`` and\nparse URLs found in ```` tags from the resulting response. It then\ncontinues this process for each URL it finds until all URLs have been\ntested. ``
`` tags and their field elements are also parsed and\neach form is tested with both a ``GET`` and ``POST``, first without\nany field data and then with test values for each form field. The test\ncase will fail if any response has a status code other than ``200``.\n\nConfiguration\n=============\n\nThe following settings can be defined in your project's ``settings``\nmodule to control the behaviour of ``django-shotgun``.\n\n * ``SHOTGUN_EXCLUDE_APPS`` - A list of app names to exclude when\n generating the shotgun fixtures file. Defaults to ``[]``.\n * ``SHOTGUN_EXCLUDE_URLS`` - A list of URLs to exclude from checking.\n Defaults to ``[]``.\n * ``SHOTGUN_FIXTURE_NAME`` - The name of the fixture file that will\n be saved and loaded from. Defaults to ``shotgun.json``.\n * ``SHOTGUN_FIXTURE_PATH`` - The path to where the fixture file will\n be saved and loaded from. Defaults to the project's root directory.\n * ``SHOTGUN_ROOT_URL`` - The first URL that the test case will\n request. Defaults to ``/``.\n\n.. _`management command`: http://docs.djangoproject.com/en/dev/ref/django-admin/#ref-django-admin\n.. _`Django test case`: http://docs.djangoproject.com/en/dev/topics/testing/#testcase\n.. _`pip`: http://www.pip-installer.org/\n.. _`dumpdata`: http://docs.djangoproject.com/en/dev/ref/django-admin/#dumpdata-appname-appname-appname-model\n.. _`test`: http://docs.djangoproject.com/en/dev/ref/django-admin/#test-app-or-test-identifier", "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/stephenmcd/django-shotgun", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-shotgun", "package_url": "https://pypi.org/project/django-shotgun/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-shotgun/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/stephenmcd/django-shotgun" }, "release_url": "https://pypi.org/project/django-shotgun/0.2/", "requires_dist": null, "requires_python": null, "summary": "A Django application for testing entire sites.", "version": "0.2" }, "last_serial": 1020934, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "be0874d9dacd15ec272243c666a7f1fe", "sha256": "bae26f5f8f979dfc397cc51ce22076fa4e79f98d324660578ec38445e8012ed4" }, "downloads": -1, "filename": "django-shotgun-0.2.tar.gz", "has_sig": false, "md5_digest": "be0874d9dacd15ec272243c666a7f1fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5368, "upload_time": "2014-03-06T09:31:25", "url": "https://files.pythonhosted.org/packages/8c/2b/9e340d0ab797d34fd445d0f9655777523b1fe54d70e37d9b47b6f5d7fd75/django-shotgun-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be0874d9dacd15ec272243c666a7f1fe", "sha256": "bae26f5f8f979dfc397cc51ce22076fa4e79f98d324660578ec38445e8012ed4" }, "downloads": -1, "filename": "django-shotgun-0.2.tar.gz", "has_sig": false, "md5_digest": "be0874d9dacd15ec272243c666a7f1fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5368, "upload_time": "2014-03-06T09:31:25", "url": "https://files.pythonhosted.org/packages/8c/2b/9e340d0ab797d34fd445d0f9655777523b1fe54d70e37d9b47b6f5d7fd75/django-shotgun-0.2.tar.gz" } ] }