From cf98cb63d6b9761c86a28be40e527765320d3eca Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Fri, 20 Dec 2013 10:28:44 -0500 Subject: [PATCH] Squash warning. --- .../linkedin/management/commands/tests/test_mailusers.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py b/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py index 1018758cb2..3f84c4f23b 100644 --- a/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py +++ b/lms/djangoapps/linkedin/management/commands/tests/test_mailusers.py @@ -8,6 +8,7 @@ import mock from certificates.models import GeneratedCertificate from django.contrib.auth.models import User from django.core import mail +from django.utils.timezone import utc from django.test import TestCase from student.models import UserProfile @@ -24,8 +25,9 @@ class MailusersTests(TestCase): def setUp(self): courses = { - 'TEST1': mock.Mock(org='TestX', number='1', - start=datetime.datetime(2010, 5, 12, 2, 42)), + 'TEST1': mock.Mock( + org='TestX', number='1', + start=datetime.datetime(2010, 5, 12, 2, 42, tzinfo=utc)), 'TEST2': mock.Mock(org='TestX', number='2'), 'TEST3': mock.Mock(org='TestX', number='3'), } @@ -153,7 +155,8 @@ class MailusersTests(TestCase): mail.outbox[1].to, ['Fred Flintstone ']) def test_certificate_url(self): - self.cert1.created_date = datetime.datetime(2010, 8, 15, 0, 0) + self.cert1.created_date = datetime.datetime( + 2010, 8, 15, 0, 0, tzinfo=utc) self.cert1.save() fut = mailusers.Command().certificate_url self.assertEqual(fut(self.cert1),