summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2012-05-03 12:00:36 -0300
committerRamiro Morales <cramm0@gmail.com>2012-05-03 12:00:36 -0300
commitea28bc2688b44559787fc12a3b8fc7939ee86f9b (patch)
treec37bbf79ba2616ef72ea44f9fe9e8d2981f601d8 /tests
parentc0395dea46231b20a97c884d4f22fc8e9dbdde66 (diff)
Removed unused file from i18n regression tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/i18n/test_warnings.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/regressiontests/i18n/test_warnings.py b/tests/regressiontests/i18n/test_warnings.py
deleted file mode 100644
index 8aac89d16c..0000000000
--- a/tests/regressiontests/i18n/test_warnings.py
+++ /dev/null
@@ -1,44 +0,0 @@
-import warnings
-from os.path import join, normpath, abspath, dirname
-
-import django
-from django.conf import settings
-from django.test.utils import get_warnings_state, restore_warnings_state
-from django.utils.translation import _trans
-from django.utils.unittest import TestCase
-
-
-class DeprecationWarningTests(TestCase):
-
- def setUp(self):
- self.warning_state = get_warnings_state()
- self.old_settings_module = settings.SETTINGS_MODULE
- settings.SETTINGS_MODULE = 'regressiontests'
- self.old_locale_paths = settings.LOCALE_PATHS
-
- def tearDown(self):
- restore_warnings_state(self.warning_state)
- settings.SETTINGS_MODULE = self.old_settings_module
- settings.LOCALE_PATHS = self.old_locale_paths
-
- def test_warn_if_project_has_locale_subdir(self):
- """Test that DeprecationWarning is generated when a deprecated project level locale/ subdir is present."""
- project_path = join(dirname(abspath(__file__)), '..')
- warnings.filterwarnings('error',
- "Translations in the project directory aren't supported anymore\. Use the LOCALE_PATHS setting instead\.",
- DeprecationWarning)
- _trans.__dict__ = {}
- self.assertRaises(DeprecationWarning, django.utils.translation.ugettext, 'Time')
-
- def test_no_warn_if_project_and_locale_paths_overlap(self):
- """Test that DeprecationWarning isn't generated when a deprecated project level locale/ subdir is also included in LOCALE_PATHS."""
- project_path = join(dirname(abspath(__file__)), '..')
- settings.LOCALE_PATHS += (normpath(join(project_path, 'locale')),)
- warnings.filterwarnings('error',
- "Translations in the project directory aren't supported anymore\. Use the LOCALE_PATHS setting instead\.",
- DeprecationWarning)
- _trans.__dict__ = {}
- try:
- django.utils.translation.ugettext('Time')
- except DeprecationWarning:
- self.fail("DeprecationWarning shouldn't be raised when settings/project locale and a LOCALE_PATHS member point to the same file system location.")