Type() is meant to be a method not an attribute.

svn path=/plone.app.discussion/trunk/; revision=27652
This commit is contained in:
Timo Stollenwerk 2009-06-24 08:25:11 +00:00
parent a7d80a1368
commit 1cc02a3acd
2 changed files with 7 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class Comment(DynamicType, Traversable, RoleManager, Owned, Implicit):
implements(IComment)
meta_type = portal_type = Type = 'Discussion Item'
meta_type = portal_type = 'Discussion Item'
__parent__ = None
@ -75,6 +75,11 @@ class Comment(DynamicType, Traversable, RoleManager, Owned, Implicit):
"""
return self.creator
def Type(self):
"""The Discussion Item content type
"""
return "Discussion Item"
# CMF's event handlers assume any IDynamicType has these :(
def opaqueItems(self):

View File

@ -45,7 +45,7 @@ class CommentTest(PloneTestCase):
def test_type(self):
comment1 = createObject('plone.Comment')
self.assertEquals(comment1.Type, 'Discussion Item')
self.assertEquals(comment1.Type(), 'Discussion Item')
def test_traversal(self):
# make sure comments are traversable, have an id, absolute_url and physical path