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
This commit is contained in:
Patrick Gerken 2011-03-09 03:03:17 +00:00
parent 4965c2bc2d
commit 65aab05d1b
2 changed files with 11 additions and 3 deletions

View File

@ -7,6 +7,10 @@ Changelog
- Added Afrikaans translations - Added Afrikaans translations
[jcbrand] [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) 1.0 (2011-02-07)
---------------- ----------------

View File

@ -431,8 +431,12 @@ class TestCommentsViewlet(PloneTestCase):
self.viewlet.update() self.viewlet.update()
portrait_url = self.viewlet.get_commenter_portrait('jim') portrait_url = self.viewlet.get_commenter_portrait('jim')
# Check if the correct default member image URL is returned # Check if the correct default member image URL is returned.
self.assertEquals(portrait_url, 'http://nohost/plone/defaultUser.gif') # 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): def test_anonymous_discussion_allowed(self):
# Anonymous discussion is not allowed by default # Anonymous discussion is not allowed by default