From 2d1d7e453c03f4585e8fed803d31deaeef3c2ee0 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 22 Sep 2007 15:14:41 +0000 Subject: [PATCH] Fixed generic view test which was failing on Postgres and MySQL. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6407 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- .../regressiontests/views/tests/generic/date_based.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/regressiontests/views/tests/generic/date_based.py b/tests/regressiontests/views/tests/generic/date_based.py index aca93d4579..94ae99a20a 100644 --- a/tests/regressiontests/views/tests/generic/date_based.py +++ b/tests/regressiontests/views/tests/generic/date_based.py @@ -43,9 +43,9 @@ class MonthArchiveTest(TestCase): author.save() # 2004 was a leap year, so it should be weird enough to not cheat - first_second_of_feb = datetime(2004, 2, 1, 0, 0, 0) - first_second_of_mar = datetime(2004, 3, 1, 0, 0, 0) - one_microsecond = timedelta(0, 0, 1) + first_second_of_feb = datetime(2004, 2, 1, 0, 0, 1) + first_second_of_mar = datetime(2004, 3, 1, 0, 0, 1) + two_seconds = timedelta(0, 2, 0) article = Article(title="example", author=author) article.date_created = first_second_of_feb @@ -53,12 +53,12 @@ class MonthArchiveTest(TestCase): response = self.client.get('/views/date_based/archive_month/2004/02/') self.assertEqual(response.status_code, 200) - article.date_created = first_second_of_feb-one_microsecond + article.date_created = first_second_of_feb-two_seconds article.save() response = self.client.get('/views/date_based/archive_month/2004/02/') self.assertEqual(response.status_code, 404) - article.date_created = first_second_of_mar-one_microsecond + article.date_created = first_second_of_mar-two_seconds article.save() response = self.client.get('/views/date_based/archive_month/2004/02/') self.assertEqual(response.status_code, 200)