Pep8
This commit is contained in:
@@ -9,7 +9,6 @@ from zope.component import getSiteManager
|
||||
from zope.component import queryUtility
|
||||
|
||||
from plone.app.testing import TEST_USER_ID, setRoles
|
||||
from plone.app.testing import logout, login
|
||||
|
||||
from Products.MailHost.interfaces import IMailHost
|
||||
from Products.CMFPlone.tests.utils import MockMailHost
|
||||
@@ -225,10 +224,12 @@ class TestModeratorNotificationUnit(unittest.TestCase):
|
||||
in msg)
|
||||
self.assertTrue('Comment text' in msg)
|
||||
self.assertTrue(
|
||||
'Approve comment:\nhttp://nohost/plone/doc1/++conversation++default/%s/@@moderat=\ne-publish-comment'
|
||||
'Approve comment:\nhttp://nohost/plone/doc1/' +
|
||||
'++conversation++default/%s/@@moderat=\ne-publish-comment'
|
||||
% comment_id in msg)
|
||||
self.assertTrue(
|
||||
'Delete comment:\nhttp://nohost/plone/doc1/++conversation++default/%s/@@moderat=\ne-delete-comment'
|
||||
'Delete comment:\nhttp://nohost/plone/doc1/' +
|
||||
'++conversation++default/%s/@@moderat=\ne-delete-comment'
|
||||
% comment_id in msg)
|
||||
|
||||
def test_notify_moderator_specific_address(self):
|
||||
|
||||
@@ -4,10 +4,12 @@ from zope.component import queryUtility, createObject
|
||||
|
||||
from plone.app.testing import TEST_USER_ID, setRoles
|
||||
|
||||
from plone.app.discussion.testing import PLONE_APP_DISCUSSION_INTEGRATION_TESTING
|
||||
from plone.app.discussion.testing import \
|
||||
PLONE_APP_DISCUSSION_INTEGRATION_TESTING
|
||||
|
||||
from plone.app.discussion.interfaces import ICommentingTool, IConversation
|
||||
|
||||
|
||||
class ToolTest(unittest.TestCase):
|
||||
|
||||
layer = PLONE_APP_DISCUSSION_INTEGRATION_TESTING
|
||||
@@ -34,8 +36,9 @@ class ToolTest(unittest.TestCase):
|
||||
# Check that the comment got indexed in the tool:
|
||||
tool = queryUtility(ICommentingTool)
|
||||
comment = list(tool.searchResults())
|
||||
self.assertTrue(len(comment) == 1, "There is only one comment, but we got"
|
||||
" %s results in the search" % len(comment))
|
||||
self.assertTrue(len(comment) == 1,
|
||||
"There is only one comment, but we got"
|
||||
" %s results in the search" % len(comment))
|
||||
self.assertEqual(comment[0].Title, 'Jim on Document 1')
|
||||
|
||||
def test_unindexing(self):
|
||||
@@ -45,5 +48,6 @@ class ToolTest(unittest.TestCase):
|
||||
# search returns only comments
|
||||
pass
|
||||
|
||||
|
||||
def test_suite():
|
||||
return unittest.defaultTestLoader.loadTestsFromName(__name__)
|
||||
|
||||
Reference in New Issue
Block a user