Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed unused file from i18n regression tests.

  • Loading branch information...
commit ea28bc2688b44559787fc12a3b8fc7939ee86f9b 1 parent c0395de
Ramiro Morales authored May 03, 2012
44  tests/regressiontests/i18n/test_warnings.py
... ...
@@ -1,44 +0,0 @@
1  
-import warnings
2  
-from os.path import join, normpath, abspath, dirname
3  
-
4  
-import django
5  
-from django.conf import settings
6  
-from django.test.utils import get_warnings_state, restore_warnings_state
7  
-from django.utils.translation import _trans
8  
-from django.utils.unittest import TestCase
9  
-
10  
-
11  
-class DeprecationWarningTests(TestCase):
12  
-
13  
-    def setUp(self):
14  
-        self.warning_state = get_warnings_state()
15  
-        self.old_settings_module = settings.SETTINGS_MODULE
16  
-        settings.SETTINGS_MODULE = 'regressiontests'
17  
-        self.old_locale_paths = settings.LOCALE_PATHS
18  
-
19  
-    def tearDown(self):
20  
-        restore_warnings_state(self.warning_state)
21  
-        settings.SETTINGS_MODULE = self.old_settings_module
22  
-        settings.LOCALE_PATHS = self.old_locale_paths
23  
-
24  
-    def test_warn_if_project_has_locale_subdir(self):
25  
-        """Test that DeprecationWarning is generated when a deprecated project level locale/ subdir is present."""
26  
-        project_path = join(dirname(abspath(__file__)), '..')
27  
-        warnings.filterwarnings('error',
28  
-                "Translations in the project directory aren't supported anymore\. Use the LOCALE_PATHS setting instead\.",
29  
-                DeprecationWarning)
30  
-        _trans.__dict__ = {}
31  
-        self.assertRaises(DeprecationWarning, django.utils.translation.ugettext, 'Time')
32  
-
33  
-    def test_no_warn_if_project_and_locale_paths_overlap(self):
34  
-        """Test that DeprecationWarning isn't generated when a deprecated project level locale/ subdir is also included in LOCALE_PATHS."""
35  
-        project_path = join(dirname(abspath(__file__)), '..')
36  
-        settings.LOCALE_PATHS += (normpath(join(project_path, 'locale')),)
37  
-        warnings.filterwarnings('error',
38  
-                "Translations in the project directory aren't supported anymore\. Use the LOCALE_PATHS setting instead\.",
39  
-                DeprecationWarning)
40  
-        _trans.__dict__ = {}
41  
-        try:
42  
-            django.utils.translation.ugettext('Time')
43  
-        except DeprecationWarning:
44  
-            self.fail("DeprecationWarning shouldn't be raised when settings/project locale and a LOCALE_PATHS member point to the same file system location.")

0 notes on commit ea28bc2

Please sign in to comment.
Something went wrong with that request. Please try again.