diff options
author | Tim Graham <timograham@gmail.com> | 2015-01-09 15:08:16 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-01-17 11:23:43 -0500 |
commit | f0a1df0b0139a7f5a576dff966210b5d52247650 (patch) | |
tree | db243673fa89ac0addb5f855961a7cfd5a8c3579 /tests/deprecation | |
parent | b845951fd41cf6a380b3e09eeb30f7d105c37061 (diff) | |
download | django-f0a1df0b0139a7f5a576dff966210b5d52247650.tar.gz |
Removed deprecated Chinese language codes; refs #18149.
Diffstat (limited to 'tests/deprecation')
-rw-r--r-- | tests/deprecation/tests.py | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py index 2d9a9beb69..ccc4f2351b 100644 --- a/tests/deprecation/tests.py +++ b/tests/deprecation/tests.py @@ -4,9 +4,9 @@ import os import unittest import warnings -from django.test import SimpleTestCase, override_settings +from django.test import SimpleTestCase from django.test.utils import reset_warning_registry -from django.utils import six, translation +from django.utils import six from django.utils.deprecation import RenameMethodsBase from django.utils.encoding import force_text @@ -175,24 +175,6 @@ class RenameMethodsTests(SimpleTestCase): ]) -@override_settings(USE_I18N=True) -class DeprecatedChineseLanguageCodes(SimpleTestCase): - def test_deprecation_warning(self): - with warnings.catch_warnings(record=True) as recorded: - warnings.simplefilter('always') - with translation.override('zh-cn'): - pass - with translation.override('zh-tw'): - pass - msgs = [str(warning.message) for warning in recorded] - self.assertEqual(msgs, [ - "The use of the language code 'zh-cn' is deprecated. " - "Please use the 'zh-hans' translation instead.", - "The use of the language code 'zh-tw' is deprecated. " - "Please use the 'zh-hant' translation instead.", - ]) - - class DeprecatingSimpleTestCaseUrls(unittest.TestCase): def test_deprecation(self): |