Aloe: Django extensions

aloe_django provides utilities to help write Aloe BDD tests for Django applications.


pip install aloe_django

Using Aloe with Django

Add aloe_django to your project’s INSTALLED_APPS.

If you want to run ordinary Python tests using Nose, you should also add django_nose to INSTALLED_APPS and set the setting TEST_RUNNER to django_nose.NoseTestSuiteRunner.

GHERKIN_TEST_CLASS = 'aloe_django.TestCase'

An aloe.testclass.TestCase to use to run the tests.

By default this will be aloe_django.TestCase, but you can inherit it to change the behaviour of items such as the Django test server (e.g. to enable a threaded server).

See Extending Aloe’s TestCase for more details.

GHERKIN_TEST_RUNNER = 'aloe_django.runner.GherkinTestRunner'

A Nose test runner used when running harvest.

class aloe_django.TestCase

Base test class for Django Gherkin tests.

Inherits from both aloe.testclass.TestCase and django.test.LiveServerTestCase.

aloe_django.django_url(step, url=None)

The URL for a page from the test server.

  • step – A Gherkin step
  • url – If specified, the relative URL to append.


Aloe-Django originally started life as part of the Python BDD tool Lettuce. Like so many succulents, it grew into so much more than that.

Indices and tables