1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Modified the test harness to respect the LANGUAGE_CODE setting. Also changed

Django's own test runner to always use 'en' for LANGUAGE_CODE when testing
core. Fixed #4709


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-10-21 17:26:32 +00:00
parent 7ca708140a
commit 3ec6568e64
2 changed files with 7 additions and 1 deletions

View File

@@ -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: