mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Used addCleanup() in tests where appropriate.
This commit is contained in:
@@ -10,11 +10,9 @@ from django.utils.timezone import get_default_timezone, get_fixed_timezone, make
|
||||
@override_settings(TIME_ZONE="Europe/Copenhagen")
|
||||
class DateFormatTests(SimpleTestCase):
|
||||
def setUp(self):
|
||||
self._orig_lang = translation.get_language()
|
||||
_orig_lang = translation.get_language()
|
||||
translation.activate("en-us")
|
||||
|
||||
def tearDown(self):
|
||||
translation.activate(self._orig_lang)
|
||||
self.addCleanup(translation.activate, _orig_lang)
|
||||
|
||||
def test_date(self):
|
||||
d = date(2009, 5, 16)
|
||||
|
||||
Reference in New Issue
Block a user