Type() is meant to be a method not an attribute.
svn path=/plone.app.discussion/trunk/; revision=27652
This commit is contained in:
parent
a7d80a1368
commit
1cc02a3acd
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user