summaryrefslogtreecommitdiff
path: root/tests/user_commands
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-01-03 20:27:18 +0100
committerClaude Paroz <claude@2xlibre.net>2015-01-07 20:11:24 +0100
commitf7c287fca9c9e6370cc88d1457d3ed9466703687 (patch)
tree35b545be3be250a97ac2e1007a8ee7a71c094030 /tests/user_commands
parent2c0f64b5f6fe25ca35feb30db7e3112a4cb916ed (diff)
Fixed #24073 -- Deactivated translations when leave_locale_alone is False
Thanks Tim Graham and Markus Holtermann for the reviews.
Diffstat (limited to 'tests/user_commands')
-rw-r--r--tests/user_commands/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py
index dff7dcaed5..c364b868a3 100644
--- a/tests/user_commands/tests.py
+++ b/tests/user_commands/tests.py
@@ -2,6 +2,7 @@ import os
from django.apps import apps
from django.db import connection
+from django.conf import settings
from django.core import management
from django.core.management import BaseCommand, CommandError, find_commands
from django.core.management.utils import find_command, popen_wrapper
@@ -52,7 +53,8 @@ class CommandTests(SimpleTestCase):
out = StringIO()
with translation.override('pl'):
management.call_command('leave_locale_alone_false', stdout=out)
- self.assertEqual(out.getvalue(), "en-us\n")
+ # get_language returns settings.LANGUAGE_CODE for NullTranslations instances
+ self.assertEqual(out.getvalue(), "%s\n" % settings.LANGUAGE_CODE)
def test_configured_locale_preserved(self):
# Leaves locale from settings when set to false