{ "info": { "author": "Luke Plant", "author_email": "L.Plant.98@cantab.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "===============\ndjango-functest\n===============\n\n.. image:: https://travis-ci.org/django-functest/django-functest.png?branch=master\n :target: https://travis-ci.org/django-functest/django-functest\n\n.. image:: https://coveralls.io/repos/django-functest/django-functest/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/django-functest/django-functest?branch=master\n\n.. image:: https://readthedocs.org/projects/django-functest/badge/?version=latest\n :target: https://django-functest.readthedocs.org/en/latest/\n\n\nHelpers for creating high-level functional tests in Django, with a unified API\nfor WebTest and Selenium tests.\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-functest.readthedocs.org.\n\nInstallation\n------------\n\n::\n\n pip install django-functest\n\nSee also the `dependencies documentation\n`_\nfor important compatibility information.\n\nFeatures\n--------\n\n* A simplified API for writing functional tests in Django (tests that check the\n behaviour of entire views, or sets of views, e.g. a checkout process).\n\n* A unified API that abstracts over both `WebTest\n `_ and `Selenium\n `_ - write two tests at once!\n\n* Many of the gotchas and difficulties of using WebTest and Selenium ironed out\n for you.\n\n* Well tested - as well as its own test suite, which is run against Firefox\n and Chrome, it is also used by `Wolf & Badger\n `_ for tests covering many business critical\n functionalities.\n\nTypical usage\n-------------\n\nIn your tests.py::\n\n from django.test import LiveServerTestCase, TestCase\n from django_functest import FuncWebTestMixin, FuncSeleniumMixin, FuncBaseMixin\n\n class ContactTestBase(FuncBaseMixin):\n # Abstract class, doesn't inherit from TestCase\n\n def test_contact_form(self):\n self.get_url('contact_form')\n self.fill({'#id_name': 'Joe',\n '#id_message': 'Hello'})\n self.submit('input[type=submit]')\n self.assertTextPresent(\"Thanks for your message\")\n\n class ContactWebTest(ContactTestBase, FuncWebTestMixin, TestCase):\n pass\n\n class ContactSeleniumTest(ContactTestBase, FuncSeleniumMixin, LiveServerTestCase):\n pass\n\nIn this way, you can write a single test with a high-level API, and run it in\ntwo ways - using a fast, WSGI-based method which emulates typical HTTP usage of a\nbrowser, and using a full browser that actually executes Javascript (if present)\netc.\n\nUnder the hood, the WSGI-based method uses and builds upon `WebTest\n`_ and `django-webtest\n`_.\n\ndjango-functest provides its functionality as mixins, so that you can have your\nown base class for tests.\n\nContributing and tests\n----------------------\n\nSee CONTRIBUTING.rst for information about running the test suite and\ncontributing to django-functest.\n\nCredits\n-------\n\nThis library was built by developers at `Wolf & Badger\n`_, released with the kind permission of that\ncompany.\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n1.0.4\n+++++\n\n* Fixed bug with setting checkboxes if a form with multiple checkboxes of the same name\n* Enabled installation on PyPy (doesn't necessarily work completely).\n* Test against Django 2.1\n* Removed tests and official support for PhantomJS. (No actual functionality\n was changed regarding PhantomJS).\n\n1.0.3\n+++++\n\n* Deprecated ``fill_by_id``. Instead of ``fill_by_id({'foo': 'bar'})`` you\n should do ``fill({'#foo': 'bar'})``, because it is shorter and more flexible.\n* Test against latest Firefox\n* Django 2.0 compatibility\n* Fix for Django 1.11.2 and later for MultiThreadedLiveServerMixin\n\n1.0.2\n+++++\n\n* Fixes to cope with WebTest 2.0.28. We now require django-webtest 1.9.2 or\n later, and only test against the latest WebTest.\n* Fixed some deprecation warnings\n\n1.0.1\n+++++\n\n* Fixed incompatibility with django-webtest 1.9.0 and later\n\n1.0\n+++\n\n* Added Django 1.11 support.\n* Dropped official Django 1.7 support (may still work).\n\n0.2.1\n+++++\n\n* Made :meth:`~django_functest.FuncCommonApi.get_literal_url` accept\n absolute URLs for Selenium (WebTest already worked by accident).\n\n0.2.0\n+++++\n\n* Added :meth:`~django_functest.FuncCommonApi.new_browser_session` and\n :meth:`~django_functest.FuncCommonApi.switch_browser_session` to the common\n API. These can be used to simulate multiple devices or users accessing the\n site. See the docs for important usage information.\n\n0.1.9\n+++++\n\n* Fix for scrolling to exactly the right place.\n* Added docstrings everywhere, and a base class you can inherit from\n for the purpose of providing autocomplete help.\n\n0.1.8\n+++++\n\n* Django 1.10 compatibility\n\n0.1.7\n+++++\n\n* Fixed performance/reliability issue caused by browsers attempting\n to retrieve ``/favicon.ico`` after visiting ``emptypage``.\n\n0.1.6\n+++++\n\n* Fixed bug where elements wouldn't scroll into view if html height is set to\n 100%\n* New method :meth:`~django_functest.FuncSeleniumMixin.get_webdriver_options`\n for customizing WebDriver behaviour.\n\n0.1.5\n+++++\n\n* Added get_session_data()\n* Improved reliability of ``FuncSeleniumMixin.get_literal_url()``\n* Allow ``