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 manage.py harvest.
-
class
aloe_django.
TestCase
¶ Base test class for Django Gherkin tests.
Inherits from both
aloe.testclass.TestCase
anddjango.test.LiveServerTestCase
.
-
aloe_django.
django_url
(step, url=None)¶ The URL for a page from the test server.
Parameters: - step – A Gherkin step
- url – If specified, the relative URL to append.