From 6d414055bcdb6e41b04be73757bdd701edcd40d9 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 22 Jun 2009 12:23:19 +0000 Subject: [PATCH] set correct Type ('Discussion Item') for Comments. svn path=/plone.app.discussion/trunk/; revision=27629 --- plone/app/discussion/comment.py | 2 +- plone/app/discussion/tests/test_comment.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 848e6f8..f79d400 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -24,7 +24,7 @@ class Comment(DynamicType, Traversable, RoleManager, Owned, Implicit): implements(IComment) - meta_type = portal_type = 'Discussion Item' + meta_type = portal_type = Type = 'Discussion Item' __parent__ = None diff --git a/plone/app/discussion/tests/test_comment.py b/plone/app/discussion/tests/test_comment.py index 9455015..95bb945 100644 --- a/plone/app/discussion/tests/test_comment.py +++ b/plone/app/discussion/tests/test_comment.py @@ -40,6 +40,10 @@ class CommentTest(PloneTestCase): comment1.creator = "Jim" self.assertEquals("Jim", comment1.Creator()) + def test_type(self): + comment1 = createObject('plone.Comment') + self.assertEquals(comment1.Type, 'Discussion Item') + def test_traversal(self): # make sure comments are traversable, have an id, absolute_url and physical path