diff options
| author | Tim Graham <timograham@gmail.com> | 2013-05-06 13:55:02 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-05-06 13:55:02 -0400 |
| commit | bc02a963db3aeebf7c349d83a492b6e093f42b00 (patch) | |
| tree | ace0d051c8d29ba9993bf840af66bb4be5105ec7 /docs/topics | |
| parent | e88680899490b9ed8b58c88ee78dc189506204c5 (diff) | |
Fixed #20177 - Corrected docs for django.test.utils.setup_test_environment.
Thanks vlad.london.uk@ for the report.
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/testing/advanced.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 9cadf796fa..5f2fa65bed 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -163,10 +163,12 @@ environment first. Django provides a convenience method to do this:: >>> from django.test.utils import setup_test_environment >>> setup_test_environment() -This convenience method sets up the test database, and puts other -Django features into modes that allow for repeatable testing. +:func:`~django.test.utils.setup_test_environment` puts several Django features +into modes that allow for repeatable testing, but does not create the test +databases; :func:`django.test.simple.DjangoTestSuiteRunner.setup_databases` +takes care of that. -The call to :meth:`~django.test.utils.setup_test_environment` is made +The call to :func:`~django.test.utils.setup_test_environment` is made automatically as part of the setup of ``./manage.py test``. You only need to manually invoke this method if you're not using running your tests via Django's test runner. @@ -282,7 +284,9 @@ Methods .. method:: DjangoTestSuiteRunner.setup_test_environment(**kwargs) - Sets up the test environment ready for testing. + Sets up the test environment by calling + :func:`~django.test.utils.setup_test_environment` and setting + :setting:`DEBUG` to ``False``. .. method:: DjangoTestSuiteRunner.build_suite(test_labels, extra_tests=None, **kwargs) |
