From 81d74cfe6b42b30ccb0e83fac6b95b11c6134a6a Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Tue, 15 Feb 2011 16:19:13 +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. svn path=/plone.app.discussion/trunk/; revision=47597 --- CHANGES.txt | 4 ++++ plone/app/discussion/tests/test_comments_viewlet.py | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2d3cfd8..24b9e0c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Changelog 2.0a2 (2011-02-08) ------------------ +- Fixed test failure for the default user portrait, which changed from + defaultUser.gif to defaultUser.png in Products.PlonePAS 4.0.5. + [maurits] + - Remove "Plone 3 only" code. [timo] 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