set correct Type ('Discussion Item') for Comments.

svn path=/plone.app.discussion/trunk/; revision=27629
This commit is contained in:
Timo Stollenwerk 2009-06-22 12:23:19 +00:00
parent bded41ffa4
commit 6d414055bc
2 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Comment(DynamicType, Traversable, RoleManager, Owned, Implicit):
implements(IComment) implements(IComment)
meta_type = portal_type = 'Discussion Item' meta_type = portal_type = Type = 'Discussion Item'
__parent__ = None __parent__ = None

View File

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