summaryrefslogtreecommitdiff
path: root/tests/model_regress/tests.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-09-08 10:43:33 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-09-09 22:32:52 +0200
commitd9413d33b2a8371731a92289123683cf6f440290 (patch)
tree2f90f5ad6e1e63d25a619f9985acb1a0bf9c61e5 /tests/model_regress/tests.py
parentec2778b445546f624d3b3a1f2118e751b10bb2e7 (diff)
downloaddjango-d9413d33b2a8371731a92289123683cf6f440290.tar.gz
Refactored code and tests that relied on django.utils.tzinfo.
Refs #17262.
Diffstat (limited to 'tests/model_regress/tests.py')
-rw-r--r--tests/model_regress/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py
index f84a40b05b..a0293975aa 100644
--- a/tests/model_regress/tests.py
+++ b/tests/model_regress/tests.py
@@ -8,7 +8,7 @@ import unittest
from django.core.exceptions import ValidationError
from django.test import TestCase, skipUnlessDBFeature
from django.utils import six
-from django.utils import tzinfo
+from django.utils.timezone import get_fixed_timezone
from django.db import connection, router
from django.db.models.sql import InsertQuery
@@ -189,8 +189,8 @@ class ModelTests(TestCase):
# Regression test for #10443.
# The idea is that all these creations and saving should work without
# crashing. It's not rocket science.
- dt1 = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=tzinfo.FixedOffset(600))
- dt2 = datetime.datetime(2008, 8, 31, 17, 20, tzinfo=tzinfo.FixedOffset(600))
+ dt1 = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=get_fixed_timezone(600))
+ dt2 = datetime.datetime(2008, 8, 31, 17, 20, tzinfo=get_fixed_timezone(600))
obj = Article.objects.create(
headline="A headline", pub_date=dt1, article_text="foo"
)