From 65aab05d1b66758fc2f49651323c0ec82a2c2794 Mon Sep 17 00:00:00 2001 From: Patrick Gerken Date: Wed, 9 Mar 2011 03:03:17 +0000 Subject: [PATCH] Fixed test failure for the default user portrait, which changed from defaultUser.gif to defaultUser.png in Products.PlonePAS 4.0.5. Backport if maurits changes to the trunk svn path=/plone.app.discussion/branches/1.x/; revision=47996 --- CHANGES.txt | 6 +++++- plone/app/discussion/tests/test_comments_viewlet.py | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f92418a..d48bb95 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,9 +4,13 @@ Changelog 1.1 (Unreleased) ------------------ -- Added Afrikaans translations +- Added Afrikaans translations [jcbrand] +- Fixed test failure for the default user portrait, which changed from + defaultUser.gif to defaultUser.png in Products.PlonePAS 4.0.5. + [maurits] + 1.0 (2011-02-07) ---------------- diff --git a/plone/app/discussion/tests/test_comments_viewlet.py b/plone/app/discussion/tests/test_comments_viewlet.py index 2160605..35dea51 100644 --- a/plone/app/discussion/tests/test_comments_viewlet.py +++ b/plone/app/discussion/tests/test_comments_viewlet.py @@ -431,8 +431,12 @@ class TestCommentsViewlet(PloneTestCase): self.viewlet.update() portrait_url = self.viewlet.get_commenter_portrait('jim') - # Check if the correct default member image URL is returned - self.assertEquals(portrait_url, 'http://nohost/plone/defaultUser.gif') + # Check if the correct default member image URL is returned. + # Note that Products.PlonePAS 4.0.5 and later have .png and + # earlier versions have .gif. + self.failUnless(portrait_url in + ('http://nohost/plone/defaultUser.png', + 'http://nohost/plone/defaultUser.gif')) def test_anonymous_discussion_allowed(self): # Anonymous discussion is not allowed by default