1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #12127 -- Corrected teardown of dateformat tests. Thanks to apollo13 for the report, and Karen Tracey for the debugging help.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2009-11-02 08:26:03 +00:00
parent be89c9abab
commit 5dfed1b24a
2 changed files with 13 additions and 17 deletions

View File

@@ -5,16 +5,6 @@ from django.utils.dateformat import format
from django.utils.tzinfo import FixedOffset, LocalTimezone
class DateFormatTests(TestCase):
def setUp(self):
self.old_TZ = os.environ.get('TZ')
os.environ['TZ'] = 'Europe/Copenhagen'
def tearDown(self):
if self.old_TZ is None:
del os.environ['TZ']
else:
os.environ['TZ'] = self.old_TZ
def test_date(self):
d = date(2009, 5, 16)
self.assertEquals(date.fromtimestamp(int(format(d, 'U'))), d)