hudson buildout added.
svn path=/plone.app.discussion/trunk/; revision=46002
This commit is contained in:
parent
549c93af29
commit
7e39197114
@ -4,6 +4,10 @@ Changelog
|
|||||||
1.0RC1 (unreleased)
|
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.
|
- Fix 'check all' on batch moderation page.
|
||||||
[davisagli]
|
[davisagli]
|
||||||
|
|
||||||
|
13
hudson.cfg
Normal file
13
hudson.cfg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[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
|
@ -10,10 +10,13 @@
|
|||||||
<five:registerPackage package="." />
|
<five:registerPackage package="." />
|
||||||
|
|
||||||
<include package="plone.indexer" />
|
<include package="plone.indexer" />
|
||||||
|
<include package="plone.uuid" />
|
||||||
|
<include package="plone.app.uuid" />
|
||||||
|
|
||||||
<include file="permissions.zcml" />
|
<include file="permissions.zcml" />
|
||||||
<include file="notifications.zcml" />
|
<include file="notifications.zcml" />
|
||||||
<include file="subscribers.zcml" />
|
<include file="subscribers.zcml" />
|
||||||
|
|
||||||
<include package=".browser" />
|
<include package=".browser" />
|
||||||
|
|
||||||
<i18n:registerTranslations directory="locales" />
|
<i18n:registerTranslations directory="locales" />
|
||||||
@ -43,6 +46,7 @@
|
|||||||
<!-- Comments -->
|
<!-- Comments -->
|
||||||
|
|
||||||
<class class=".comment.Comment">
|
<class class=".comment.Comment">
|
||||||
|
<implements interface="plone.uuid.interfaces.IAttributeUUID" />
|
||||||
<require interface=".interfaces.IComment" permission="zope2.View" />
|
<require interface=".interfaces.IComment" permission="zope2.View" />
|
||||||
<require attributes="Title Creator getId getText" permission="zope2.View" />
|
<require attributes="Title Creator getId getText" permission="zope2.View" />
|
||||||
</class>
|
</class>
|
||||||
|
@ -6,9 +6,10 @@ import logging
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from zope.component import createObject
|
from zope.component import createObject
|
||||||
|
|
||||||
from zope.component import getMultiAdapter
|
from zope.component import getMultiAdapter
|
||||||
|
|
||||||
|
from Products.CMFCore.utils import getToolByName
|
||||||
|
|
||||||
from Products.PloneTestCase.ptc import PloneTestCase
|
from Products.PloneTestCase.ptc import PloneTestCase
|
||||||
|
|
||||||
from plone.app.discussion.tests.layer import DiscussionLayer
|
from plone.app.discussion.tests.layer import DiscussionLayer
|
||||||
@ -26,12 +27,11 @@ class CommentTest(PloneTestCase):
|
|||||||
layer = DiscussionLayer
|
layer = DiscussionLayer
|
||||||
|
|
||||||
def afterSetUp(self):
|
def afterSetUp(self):
|
||||||
"""Create a document.
|
# First we need to create some content.
|
||||||
"""
|
|
||||||
self.loginAsPortalOwner()
|
self.loginAsPortalOwner()
|
||||||
self.portal.invokeFactory(id='doc1',
|
typetool = self.portal.portal_types
|
||||||
title='Document 1',
|
typetool.constructContent('Document', self.portal, 'doc1')
|
||||||
type_name='Document')
|
self.catalog = getToolByName(self.portal, 'portal_catalog')
|
||||||
|
|
||||||
def test_factory(self):
|
def test_factory(self):
|
||||||
comment1 = createObject('plone.Comment')
|
comment1 = createObject('plone.Comment')
|
||||||
@ -83,6 +83,35 @@ class CommentTest(PloneTestCase):
|
|||||||
conversation.addComment(comment1)
|
conversation.addComment(comment1)
|
||||||
self.assertEquals(u"Tarek Ziadé on Document äüö", comment1.Title())
|
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):
|
def test_creator(self):
|
||||||
comment1 = createObject('plone.Comment')
|
comment1 = createObject('plone.Comment')
|
||||||
comment1.creator = "Jim"
|
comment1.creator = "Jim"
|
||||||
|
1
setup.py
1
setup.py
@ -26,6 +26,7 @@ setup(name='plone.app.discussion',
|
|||||||
'collective.monkeypatcher',
|
'collective.monkeypatcher',
|
||||||
'plone.app.layout',
|
'plone.app.layout',
|
||||||
'plone.app.registry',
|
'plone.app.registry',
|
||||||
|
'plone.app.uuid',
|
||||||
'plone.app.z3cform',
|
'plone.app.z3cform',
|
||||||
'plone.indexer',
|
'plone.indexer',
|
||||||
'plone.registry',
|
'plone.registry',
|
||||||
|
Loading…
Reference in New Issue
Block a user