diff options
| author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2016-08-04 11:29:59 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-08-05 17:38:49 -0400 |
| commit | 42f9d65107692528583786a0695e26e2cbfc51a0 (patch) | |
| tree | 479f3d74f3e1f2a6c442eb9c0fb96702c7852316 /django/test | |
| parent | cdf54db6c52609911d7ea2af472ee340919e5994 (diff) | |
Edited docs of test.utils.setup/teardown_test_environment().
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/utils.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/django/test/utils.py b/django/test/utils.py index ce235a5cea..3ae68b8a2f 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -95,11 +95,9 @@ def instrumented_test_render(self, context): def setup_test_environment(): - """Perform any global pre-test setup. This involves: - - - Installing the instrumented test renderer - - Set the email backend to the locmem email backend. - - Setting the active locale to match the LANGUAGE_CODE setting. + """ + Perform global pre-test setup, such as installing the instrumented template + renderer and setting the email backend to the locmem email backend. """ Template._original_render = Template._render Template._render = instrumented_test_render @@ -120,10 +118,9 @@ def setup_test_environment(): def teardown_test_environment(): - """Perform any global post-test teardown. This involves: - - - Restoring the original test renderer - - Restoring the email sending functions + """ + Perform any global post-test teardown, such as restoring the original + template renderer and restoring the email sending functions. """ Template._render = Template._original_render del Template._original_render |
