From b4a1bb86695eae4750ad0ef130eb5944092c8965 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 5 Mar 2015 10:08:39 +0100 Subject: [PATCH] Updated test to be date-independent Fixes commit 8714403614. --- tests/model_forms/tests.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 7ba9efefbc..1e86c4d7ba 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -2289,13 +2289,15 @@ class OtherModelFormTests(TestCase): model = PublicationDefaults fields = '__all__' + self.maxDiff = 2000 form = PublicationDefaultsForm() + today_str = str(datetime.date.today()) self.assertHTMLEqual( form.as_p(), """

- -

+ +

@@ -2304,12 +2306,13 @@ class OtherModelFormTests(TestCase): - """ + + """.format(today_str) ) empty_data = { 'title': '', - 'date_published': '2015-03-04', - 'initial-date_published': '2015-03-04', + 'date_published': today_str, + 'initial-date_published': today_str, 'mode': 'di', 'initial-mode': 'di', 'category': '3',