Pep8
This commit is contained in:
parent
b5f4df5f17
commit
f0a9d9ad6b
@ -1,7 +1,5 @@
|
||||
from Products.CMFCore.utils import getToolByName
|
||||
|
||||
from zope.component import queryUtility
|
||||
|
||||
from Acquisition import aq_inner, aq_parent
|
||||
|
||||
from zope.annotation.interfaces import IAnnotations
|
||||
|
@ -1,14 +1,15 @@
|
||||
from Products.CMFCore.utils import getToolByName
|
||||
|
||||
|
||||
def index_object(obj, event):
|
||||
"""Index the object when it is added to the conversation.
|
||||
"""
|
||||
catalog = getToolByName(obj, 'portal_catalog')
|
||||
return catalog.reindexObject(obj)
|
||||
|
||||
|
||||
def unindex_object(obj, event):
|
||||
"""Unindex the object when it is removed from the conversation.
|
||||
"""
|
||||
catalog = getToolByName(obj, 'portal_catalog')
|
||||
return catalog.unindexObject(obj)
|
||||
|
||||
|
@ -19,8 +19,6 @@ from plone.app.discussion.testing import (
|
||||
|
||||
from plone.app.discussion.interfaces import IConversation
|
||||
|
||||
from plone.app.discussion.testing import COLLECTION_TYPE
|
||||
|
||||
|
||||
class CatalogSetupTest(unittest.TestCase):
|
||||
|
||||
|
@ -308,7 +308,7 @@ class ConversationTest(unittest.TestCase):
|
||||
|
||||
# Create a folder
|
||||
self.typetool.constructContent('Folder', self.portal, 'f1')
|
||||
f1 = self.portal.f1
|
||||
|
||||
# Usually we don't create a conversation on a folder
|
||||
conversation = self.portal.f1.restrictedTraverse('@@conversation_view')
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
|
||||
from DateTime import DateTime
|
||||
|
||||
from zope.component import createObject
|
||||
|
||||
from Products.CMFCore.utils import getToolByName
|
||||
|
Loading…
Reference in New Issue
Block a user