mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.1.X] Fixed #12127 -- Corrected teardown of dateformat tests. Thanks to apollo13 for the report, and Karen Tracey for the debugging help.
Backport of r11705 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user