diff --git a/django/utils/timezone.py b/django/utils/timezone.py index 0c44d4fd4d..c0ea04c7d8 100644 --- a/django/utils/timezone.py +++ b/django/utils/timezone.py @@ -360,7 +360,7 @@ def make_aware(value, timezone): # Check that we won't overwrite the timezone of an aware datetime. if is_aware(value): raise ValueError( - "make_aware expects a naive datetime, got %s" % value) + "make_aware expects a naive datetime, got %s" % value) # This may be wrong around DST changes! return value.replace(tzinfo=timezone) diff --git a/tests/invalid_models_tests/test_ordinary_fields.py b/tests/invalid_models_tests/test_ordinary_fields.py index 176a932c49..cd71f47469 100644 --- a/tests/invalid_models_tests/test_ordinary_fields.py +++ b/tests/invalid_models_tests/test_ordinary_fields.py @@ -6,7 +6,7 @@ import unittest from django.core.checks import Error, Warning as DjangoWarning from django.db import connection, models from django.test.utils import override_settings -from django.utils.timezone import make_aware, now +from django.utils.timezone import now from .base import IsolatedModelsTestCase @@ -207,7 +207,7 @@ class DateFieldTests(IsolatedModelsTestCase): field1 = models.DateTimeField(auto_now=True, auto_now_add=False, default=now) field2 = models.DateTimeField(auto_now=False, auto_now_add=True, default=now) field3 = models.DateTimeField(auto_now=True, auto_now_add=True, default=None) - + expected = [] checks = [] for i in range(4): diff --git a/tests/utils_tests/test_timezone.py b/tests/utils_tests/test_timezone.py index aec58e394f..ae78d68103 100644 --- a/tests/utils_tests/test_timezone.py +++ b/tests/utils_tests/test_timezone.py @@ -109,7 +109,7 @@ class TimezoneTests(unittest.TestCase): timezone.make_naive(datetime.datetime(2011, 9, 1, 13, 20, 30), EAT) @unittest.skipIf(pytz is None, "this test requires pytz") - def test_make_aware(self): + def test_make_aware2(self): self.assertEqual( timezone.make_aware(datetime.datetime(2011, 9, 1, 12, 20, 30), CET), CET.localize(datetime.datetime(2011, 9, 1, 12, 20, 30)))