diff options
Diffstat (limited to 'django/test/utils.py')
-rw-r--r-- | django/test/utils.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/django/test/utils.py b/django/test/utils.py index bc3f823a3a..393da3b17c 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -2,7 +2,6 @@ from contextlib import contextmanager import logging import re import sys -from threading import local import time from unittest import skipUnless import warnings @@ -502,22 +501,6 @@ def patch_logger(logger_name, log_level): setattr(logger, log_level, orig) -class TransRealMixin(object): - """This is the only way to reset the translation machinery. Otherwise - the test suite occasionally fails because of global state pollution - between tests.""" - def flush_caches(self): - from django.utils.translation import trans_real - trans_real._translations = {} - trans_real._active = local() - trans_real._default = None - trans_real.check_for_language.cache_clear() - - def tearDown(self): - self.flush_caches() - super(TransRealMixin, self).tearDown() - - # On OSes that don't provide tzset (Windows), we can't set the timezone # in which the program runs. As a consequence, we must skip tests that # don't enforce a specific timezone (with timezone.override or equivalent), |