Skip to content
Browse files

Fixed issue #6 -- Ensure the decorator tests run when while TIME_ZONE…

… is set to UTC. Thanks mandric for reporting this.

git-svn-id: https://django-timezones.googlecode.com/svn/trunk@39 86ebb30f-654e-0410-bc0d-7bf82786d749
  • Loading branch information...
1 parent ab303ff commit 6ef7ec51fa5e5ccf4d126a2e089fa029afafcc3b @brosner committed Dec 11, 2008
Showing with 6 additions and 6 deletions.
  1. +6 −6 timezones/tests.py
View
12 timezones/tests.py
@@ -1,10 +1,12 @@
__test__ = {"API_TESTS": r"""
+>>> from datetime import datetime
+
>>> from django.conf import settings
>>> ORIGINAL_TIME_ZONE = settings.TIME_ZONE
>>> settings.TIME_ZONE = "UTC"
->>> from timezones import forms
+>>> from timezones import forms, decorators
# the default case where no timezone is given explicitly.
# uses settings.TIME_ZONE.
@@ -21,11 +23,6 @@
>>> f.clean('US/Eastern')
<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>
->>> settings.TIME_ZONE = ORIGINAL_TIME_ZONE
-""",
-"DECORATOR_TESTS": r"""
->>> from timezones import decorators
->>> from datetime import *
>>> class Foo(object):
... datetime = datetime(2008, 6, 20, 23, 58, 17)
... @decorators.localdatetime('datetime')
@@ -42,4 +39,7 @@
datetime.datetime(2008, 6, 12, 13, 50, tzinfo=<UTC>)
>>> foo.localdatetime
datetime.datetime(2008, 6, 12, 23, 50, tzinfo=<DstTzInfo 'Australia/Lindeman' EST+10:00:00 STD>)
+
+
+>>> settings.TIME_ZONE = ORIGINAL_TIME_ZONE
"""}

0 comments on commit 6ef7ec5

Please sign in to comment.
Something went wrong with that request. Please try again.