mirror of https://github.com/django/django.git
Made dateformat tests reactivate original language
This commit is contained in:
parent
226a9fb2ea
commit
21189cb80b
|
@ -14,6 +14,7 @@ class DateFormatTests(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.old_TZ = os.environ.get('TZ')
|
self.old_TZ = os.environ.get('TZ')
|
||||||
os.environ['TZ'] = 'Europe/Copenhagen'
|
os.environ['TZ'] = 'Europe/Copenhagen'
|
||||||
|
self._orig_lang = translation.get_language()
|
||||||
translation.activate('en-us')
|
translation.activate('en-us')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -25,6 +26,7 @@ class DateFormatTests(unittest.TestCase):
|
||||||
self.tz_tests = False
|
self.tz_tests = False
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
translation.activate(self._orig_lang)
|
||||||
if self.old_TZ is None:
|
if self.old_TZ is None:
|
||||||
del os.environ['TZ']
|
del os.environ['TZ']
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue