summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2007-10-26 20:47:20 +0000
committerJustin Bronn <jbronn@gmail.com>2007-10-26 20:47:20 +0000
commit4ffbddf92d89c3b31cef90043721184a501cd454 (patch)
treedb8131d40b0a5437270a6b1e8d579113ab3508e8 /django/test
parentf66ee9d0065838a0f6c9c76203a775a78446cdf7 (diff)
gis: Merged revisions 6525-6613 via svnmerge from [repos:django/trunk trunk].
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/test')
-rw-r--r--django/test/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/test/utils.py b/django/test/utils.py
index 6edd186b54..51ca37e2f0 100644
--- a/django/test/utils.py
+++ b/django/test/utils.py
@@ -6,6 +6,7 @@ from django.core.management import call_command
from django.dispatch import dispatcher
from django.test import signals
from django.template import Template
+from django.utils.translation import deactivate
# The prefix to put on the default database name when creating
# the test database.
@@ -43,7 +44,7 @@ def setup_test_environment():
- Installing the instrumented test renderer
- Diverting the email sending functions to a test buffer
-
+ - Setting the active locale to match the LANGUAGE_CODE setting.
"""
Template.original_render = Template.render
Template.render = instrumented_test_render
@@ -53,6 +54,8 @@ def setup_test_environment():
mail.outbox = []
+ deactivate()
+
def teardown_test_environment():
"""Perform any global post-test teardown. This involves: