Commit 13d83908 authored by Karen Tracey's avatar Karen Tracey
Browse files

[1.1.X] Changed setUp and tearDown for the tests converted from doctests in r11695

to not assume TZ absolutely will be set in the environment. That environment
variable does not necessarily exist on Windows, it seems. 

r11699 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 8061665c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -6,10 +6,13 @@ from django.utils.tzinfo import FixedOffset, LocalTimezone

class DateFormatTests(TestCase):
    def setUp(self):
        self.old_TZ = os.environ['TZ']
        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):