mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.
For more information on this project, see this thread:
cf0423bbb8
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
01f70349c9
commit
9b1cb755a2
58 changed files with 2720 additions and 284 deletions
18
tests/regressiontests/utils/timezone.py
Normal file
18
tests/regressiontests/utils/timezone.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import copy
|
||||
import pickle
|
||||
from django.utils.timezone import UTC, LocalTimezone
|
||||
from django.utils import unittest
|
||||
|
||||
class TimezoneTests(unittest.TestCase):
|
||||
|
||||
def test_copy(self):
|
||||
self.assertIsInstance(copy.copy(UTC()), UTC)
|
||||
self.assertIsInstance(copy.copy(LocalTimezone()), LocalTimezone)
|
||||
|
||||
def test_deepcopy(self):
|
||||
self.assertIsInstance(copy.deepcopy(UTC()), UTC)
|
||||
self.assertIsInstance(copy.deepcopy(LocalTimezone()), LocalTimezone)
|
||||
|
||||
def test_pickling_unpickling(self):
|
||||
self.assertIsInstance(pickle.loads(pickle.dumps(UTC())), UTC)
|
||||
self.assertIsInstance(pickle.loads(pickle.dumps(LocalTimezone())), LocalTimezone)
|
Loading…
Add table
Add a link
Reference in a new issue