Nuke trailing white space

svn path=/plone.app.discussion/trunk/; revision=46366
This commit is contained in:
Maurits van Rees 2010-12-15 23:52:56 +00:00
parent aff8a3709c
commit a2a17085a3
38 changed files with 507 additions and 505 deletions

View File

@ -84,7 +84,7 @@ class TestCommentForm(PloneTestCase):
commentForm = getMultiAdapter((self.context, request),
name=u"comment-form")
commentForm.update()
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
self.assertEquals(len(errors), 1)
self.failIf(commentForm.handleComment(commentForm, "foo"))
@ -96,7 +96,7 @@ class TestCommentForm(PloneTestCase):
commentForm = getMultiAdapter((self.context, request),
name=u"comment-form")
commentForm.update()
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
self.assertEquals(len(errors), 0)
self.failIf(commentForm.handleComment(commentForm, "foo"))
@ -135,7 +135,7 @@ class TestCommentForm(PloneTestCase):
commentForm = getMultiAdapter((self.context, request),
name=u"comment-form")
commentForm.update()
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
self.assertEquals(len(errors), 0)
self.failIf(commentForm.handleComment(commentForm, "action"))
@ -163,7 +163,7 @@ class TestCommentForm(PloneTestCase):
commentForm = getMultiAdapter((self.context, request),
name=u"comment-form")
commentForm.update()
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
# No form errors, but raise unauthorized because discussion is not
# allowed
@ -199,7 +199,7 @@ class TestCommentForm(PloneTestCase):
commentForm = getMultiAdapter((self.context, request),
name=u"comment-form")
commentForm.update()
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
self.assertEquals(len(errors), 0)
self.assertRaises(Unauthorized,
@ -235,7 +235,7 @@ class TestCommentsViewlet(PloneTestCase):
Second paragraph"""
self.assertEquals(self.viewlet.cook(text),
"<p>First paragraph<br /> <br /> Second paragraph</p>")
"<p>First paragraph<br /><br /> Second paragraph</p>")
def test_cook_no_html(self):
text = """<b>Got HTML?</b>"""
@ -314,7 +314,6 @@ class TestCommentsViewlet(PloneTestCase):
"Plain text formatting. Web and email addresses are transformed " +
"into clickable links.")
def test_has_replies(self):
self.assertEquals(self.viewlet.has_replies(), False)
comment = createObject('plone.Comment')
@ -464,5 +463,6 @@ class TestCommentsViewlet(PloneTestCase):
localized_time = self.viewlet.format_time(python_time)
self.assertEquals(localized_time, "Feb 01, 2009 11:32 PM")
def test_suite():
return unittest.defaultTestLoader.loadTestsFromName(__name__)

View File

@ -99,6 +99,7 @@ class ConversationIndexersTest(PloneTestCase):
#self.assert_(isinstance(catalog.commentators,
# DelegatingIndexerFactory))
class CommentIndexersTest(PloneTestCase):
layer = DiscussionLayer
@ -145,7 +146,7 @@ class CommentIndexersTest(PloneTestCase):
self.conversation.addComment(comment_long)
self.assertEquals(catalog.description(comment_long)(),
LONG_TEXT_CUT.replace("\n", ""))
LONG_TEXT_CUT.replace("\n", " "))
def test_dates(self):
# Test if created, modified, effective etc. are set correctly
@ -171,5 +172,6 @@ class CommentIndexersTest(PloneTestCase):
# object the comment was added to
self.assertEquals(catalog.in_response_to(self.comment)(), 'Document 1')
def test_suite():
return unittest.defaultTestLoader.loadTestsFromName(__name__)