Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #20502 (again) -- More i18n cache flush in tests

Thanks Timo Graham for noticing the failures.
  • Loading branch information...
commit b67f2ac8e6f8cdef237590ffb2c85fc30454ba75 1 parent 9ed971f
Claude Paroz authored June 06, 2013
4  django/contrib/humanize/tests.py
@@ -19,6 +19,8 @@
19 19
 from django.utils import tzinfo
20 20
 from django.utils.unittest import skipIf
21 21
 
  22
+from i18n import TransRealMixin
  23
+
22 24
 
23 25
 # Mock out datetime in some tests so they don't fail occasionally when they
24 26
 # run too slow. Use a fixed datetime for datetime.now(). DST change in
@@ -36,7 +38,7 @@ def now(self, tz=None):
36 38
             return now.replace(tzinfo=tz) + tz.utcoffset(now)
37 39
 
38 40
 
39  
-class HumanizeTests(TestCase):
  41
+class HumanizeTests(TransRealMixin, TestCase):
40 42
 
41 43
     def humanize_tester(self, test_list, result_list, method):
42 44
         for test_content, result in zip(test_list, result_list):
3  tests/forms_tests/tests/test_regressions.py
@@ -8,9 +8,10 @@
8 8
 from django.utils.translation import ugettext_lazy, override
9 9
 
10 10
 from forms_tests.models import Cheese
  11
+from i18n import TransRealMixin
11 12
 
12 13
 
13  
-class FormsRegressionsTestCase(TestCase):
  14
+class FormsRegressionsTestCase(TransRealMixin, TestCase):
14 15
     def test_class(self):
15 16
         # Tests to prevent against recurrences of earlier bugs.
16 17
         extra_attrs = {'class': 'special'}
11  tests/template_tests/tests.py
@@ -36,6 +36,7 @@
36 36
 from django.utils import six
37 37
 from django.utils.tzinfo import LocalTimezone
38 38
 
  39
+from i18n import TransRealMixin
39 40
 
40 41
 try:
41 42
     from .loaders import RenderToStringTest, EggLoaderTest
@@ -154,8 +155,8 @@ class UTF8Class:
154 155
     def __str__(self):
155 156
         return 'ŠĐĆŽćžšđ'
156 157
 
157  
-@override_settings(MEDIA_URL="/media/", STATIC_URL="/static/")
158  
-class Templates(TestCase):
  158
+
  159
+class TemplateLoaderTests(TestCase):
159 160
 
160 161
     def test_loaders_security(self):
161 162
         ad_loader = app_directories.Loader()
@@ -347,6 +348,9 @@ def test_extends_include_missing_cachedloader(self):
347 348
             loader.template_source_loaders = old_loaders
348 349
             settings.TEMPLATE_DEBUG = old_td
349 350
 
  351
+
  352
+class TemplateRegressionTests(TestCase):
  353
+
350 354
     def test_token_smart_split(self):
351 355
         # Regression test for #7027
352 356
         token = template.Token(template.TOKEN_BLOCK, 'sometag _("Page not found") value|yesno:_("yes,no")')
@@ -453,6 +457,9 @@ def test_super_errors(self):
453 457
         with self.assertRaises(urlresolvers.NoReverseMatch):
454 458
             t.render(Context({}))
455 459
 
  460
+
  461
+@override_settings(MEDIA_URL="/media/", STATIC_URL="/static/")
  462
+class TemplateTests(TransRealMixin, TestCase):
456 463
     def test_templates(self):
457 464
         template_tests = self.get_template_tests()
458 465
         filter_tests = filters.get_filter_tests()

0 notes on commit b67f2ac

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