{ "info": { "author": "Janneke Janssen", "author_email": "j.janssen@lukkien.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Browsers", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing" ], "description": "django-testhook\n===============\n\nA Django template tag to enable testhook attributes on HTML elements.\n\n.. image:: https://travis-ci.org/jjanssen/django-testhook.svg?branch=master\n :target: http://travis-ci.org/jjanssen/django-testhook\n.. image:: https://img.shields.io/pypi/v/django-testhook.svg\n :target: https://pypi.python.org/pypi/django-testhook/\n.. image:: https://img.shields.io/pypi/dm/django-testhook.svg\n :target: https://pypi.python.org/pypi/django-testhook/\n.. image:: https://img.shields.io/badge/wheel-yes-green.svg\n :target: https://pypi.python.org/pypi/django-testhook/\n.. image:: https://img.shields.io/pypi/l/django-testhook.svg\n :target: https://pypi.python.org/pypi/django-testhook/\n.. image:: https://img.shields.io/pypi/pyversions/Django.svg\n :target: https://pypi.python.org/pypi/django-testhook/\n.. image:: https://coveralls.io/repos/jjanssen/django-testhook/badge.svg?branch=master\n :target: https://coveralls.io/github/jjanssen/django-testhook?branch=master\n\nAbout django-testhook\n---------------------\n\nThe django-testhook provides a template tag to generate\n``data-testhook-id`` for HTML templates.\n\nThis can be useful for automated testing (for eg:\n`Webdriver.IO `__) to maintain a fixed entry\npoint, rather than having a automated test that breaks by just renaming\na CSS class or an element which can require you to re-evaluate an\nXPath-selector.\n\nRequirements\n------------\n\nDjango 1.8.x or greater, Python 2.7 or greater.\n\nInstallation\n------------\n\nInstall django-testhook with pip:\n\n::\n\n $ pip install django-testhook\n\nConfiguration\n-------------\n\nConfiguring django-testhook\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdd the following to your settings file:\n\n.. code:: python\n\n INSTALLED_APPS += (\n 'testhook',\n )\n\nAvailable settings\n~~~~~~~~~~~~~~~~~~\n\nBy default the rendering of testhook data attributes is enabled. If you\nare in the scenario you want to disable it for a certain environment\njust configure it to ``False``.\n\n.. code:: python\n\n TESTHOOK_ENABLED = False\n\nUsage\n-----\n\nBasic usage\n~~~~~~~~~~~\n\nWithin your HTML template you must load the testhook tag in order to use\nit. The testhook tag only requires a single argument in order to return\na result.\n\n.. code:: html\n\n {% load testhook %}\n\n
\n I want to test this\n
\n\nThis will output to the following:\n\n.. code:: html\n\n
\n I want to test this\n
\n\nObject Usage\n~~~~~~~~~~~~\n\nFor dynamic elements there is also the option to pass arguments. For eg:\ngiven I have a product in a shopping basket with a primary key and a\nslug I could use it like this:\n\n.. code:: html\n\n
\n {{ product.title }}\n
\n\nIt will output to:\n\n.. code:: html\n\n
\n A product title\n
", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jjanssen/django-testhook", "keywords": "templatetag testhook django", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "django-testhook", "package_url": "https://pypi.org/project/django-testhook/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-testhook/", "project_urls": { "Homepage": "http://github.com/jjanssen/django-testhook" }, "release_url": "https://pypi.org/project/django-testhook/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "A Django template tag to enable testhook attributes on HTML elements.", "version": "1.0.2" }, "last_serial": 2880750, "releases": { "1.0.0": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "1a747e616b75c227cb905753421a5c09", "sha256": "86353cbc172019685641af32979ba635d14a7c5933662d27f0c1c9d22e0f863f" }, "downloads": -1, "filename": "django-testhook-1.0.1.tar.gz", "has_sig": false, "md5_digest": "1a747e616b75c227cb905753421a5c09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7918, "upload_time": "2016-08-16T09:46:00", "url": "https://files.pythonhosted.org/packages/7c/c9/c1e8dcaba502871ed918f1f704fbb9a795df4a0606681007bc3a3c2f9555/django-testhook-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "5c41f2168e2212d1173f410c8b5a7419", "sha256": "946c01590431961ca6d65b2dc005c1df34f23d73cdb4e25c0bc57287859750f6" }, "downloads": -1, "filename": "django-testhook-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5c41f2168e2212d1173f410c8b5a7419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7893, "upload_time": "2017-05-17T14:54:51", "url": "https://files.pythonhosted.org/packages/bf/67/050dad0b5cdb0034de7e2aba27d12ed68209137d37961e6075aea1baecf5/django-testhook-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c41f2168e2212d1173f410c8b5a7419", "sha256": "946c01590431961ca6d65b2dc005c1df34f23d73cdb4e25c0bc57287859750f6" }, "downloads": -1, "filename": "django-testhook-1.0.2.tar.gz", "has_sig": false, "md5_digest": "5c41f2168e2212d1173f410c8b5a7419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7893, "upload_time": "2017-05-17T14:54:51", "url": "https://files.pythonhosted.org/packages/bf/67/050dad0b5cdb0034de7e2aba27d12ed68209137d37961e6075aea1baecf5/django-testhook-1.0.2.tar.gz" } ] }