From d9413d33b2a8371731a92289123683cf6f440290 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 8 Sep 2013 10:43:33 +0200 Subject: Refactored code and tests that relied on django.utils.tzinfo. Refs #17262. --- tests/model_regress/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/model_regress/tests.py') 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" ) -- cgit v1.2.1