From b08d7ddbeb2ebab8a846249a1acdc9b28e804fdf Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sun, 28 Nov 2010 10:00:31 +0000 Subject: [PATCH] revert r46002. svn path=/plone.app.discussion/trunk/; revision=46003 --- CHANGES.txt | 4 -- hudson.cfg | 13 ------- plone/app/discussion/configure.zcml | 6 +-- plone/app/discussion/tests/test_comment.py | 43 ++++------------------ setup.py | 1 - 5 files changed, 8 insertions(+), 59 deletions(-) delete mode 100644 hudson.cfg diff --git a/CHANGES.txt b/CHANGES.txt index aa42631..3d64c0c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,10 +4,6 @@ Changelog 1.0RC1 (unreleased) ------------------- -- Make sure comment UIDs in the catalog are always unique. This fixes - http://dev.plone.org/plone/ticket/10652. - [timo] - - Fix 'check all' on batch moderation page. [davisagli] diff --git a/hudson.cfg b/hudson.cfg deleted file mode 100644 index cbe1565..0000000 --- a/hudson.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[buildout] -extends = - buildout.cfg - http://svn.plone.org/svn/collective/buildout/hudson/hudson.cfg - -package-name = plone.app.discussion -package-directories = . - -jstestdriver-directories = - plone/app/discussion - -browsers = - /usr/bin/firefox \ No newline at end of file diff --git a/plone/app/discussion/configure.zcml b/plone/app/discussion/configure.zcml index db814eb..e7b9d2f 100644 --- a/plone/app/discussion/configure.zcml +++ b/plone/app/discussion/configure.zcml @@ -10,13 +10,10 @@ - - - + - @@ -46,7 +43,6 @@ - diff --git a/plone/app/discussion/tests/test_comment.py b/plone/app/discussion/tests/test_comment.py index 0f3f6eb..cc115a1 100644 --- a/plone/app/discussion/tests/test_comment.py +++ b/plone/app/discussion/tests/test_comment.py @@ -6,9 +6,8 @@ import logging import unittest from zope.component import createObject -from zope.component import getMultiAdapter -from Products.CMFCore.utils import getToolByName +from zope.component import getMultiAdapter from Products.PloneTestCase.ptc import PloneTestCase @@ -27,12 +26,13 @@ class CommentTest(PloneTestCase): layer = DiscussionLayer def afterSetUp(self): - # First we need to create some content. + """Create a document. + """ self.loginAsPortalOwner() - typetool = self.portal.portal_types - typetool.constructContent('Document', self.portal, 'doc1') - self.catalog = getToolByName(self.portal, 'portal_catalog') - + self.portal.invokeFactory(id='doc1', + title='Document 1', + type_name='Document') + def test_factory(self): comment1 = createObject('plone.Comment') self.assert_(IComment.providedBy(comment1)) @@ -83,35 +83,6 @@ class CommentTest(PloneTestCase): conversation.addComment(comment1) self.assertEquals(u"Tarek Ziadé on Document äüö", comment1.Title()) - def test_uid(self): - conversation = IConversation(self.portal.doc1) - comment1 = createObject('plone.Comment') - conversation.addComment(comment1) - comment_brain = self.catalog.searchResults( - portal_type = 'Discussion Item')[0] - self.failUnless(comment_brain.UID) - - def test_uid_is_unique(self): - conversation = IConversation(self.portal.doc1) - comment1 = createObject('plone.Comment') - conversation.addComment(comment1) - comment2 = createObject('plone.Comment') - conversation.addComment(comment2) - brains = self.catalog.searchResults( - portal_type = 'Discussion Item') - self.assertNotEquals(brains[0].UID, None) - self.assertNotEquals(brains[1].UID, None) - self.assertNotEquals(brains[0].UID, brains[1].UID) - - def test_comment_uid_differs_from_content_uid(self): - conversation = IConversation(self.portal.doc1) - comment1 = createObject('plone.Comment') - conversation.addComment(comment1) - comment_brain = self.catalog.searchResults( - portal_type = 'Discussion Item')[0] - self.assertNotEquals(comment_brain.UID, None) - self.assertNotEquals(self.portal.doc1.UID, comment_brain.UID) - def test_creator(self): comment1 = createObject('plone.Comment') comment1.creator = "Jim" diff --git a/setup.py b/setup.py index 022e09a..e9278dc 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,6 @@ setup(name='plone.app.discussion', 'collective.monkeypatcher', 'plone.app.layout', 'plone.app.registry', - 'plone.app.uuid', 'plone.app.z3cform', 'plone.indexer', 'plone.registry',