Nuke trailing white space
svn path=/plone.app.discussion/trunk/; revision=46366
This commit is contained in:
parent
aff8a3709c
commit
a2a17085a3
@ -84,7 +84,7 @@ class TestCommentForm(PloneTestCase):
|
|||||||
commentForm = getMultiAdapter((self.context, request),
|
commentForm = getMultiAdapter((self.context, request),
|
||||||
name=u"comment-form")
|
name=u"comment-form")
|
||||||
commentForm.update()
|
commentForm.update()
|
||||||
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
||||||
|
|
||||||
self.assertEquals(len(errors), 1)
|
self.assertEquals(len(errors), 1)
|
||||||
self.failIf(commentForm.handleComment(commentForm, "foo"))
|
self.failIf(commentForm.handleComment(commentForm, "foo"))
|
||||||
@ -96,7 +96,7 @@ class TestCommentForm(PloneTestCase):
|
|||||||
commentForm = getMultiAdapter((self.context, request),
|
commentForm = getMultiAdapter((self.context, request),
|
||||||
name=u"comment-form")
|
name=u"comment-form")
|
||||||
commentForm.update()
|
commentForm.update()
|
||||||
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
||||||
|
|
||||||
self.assertEquals(len(errors), 0)
|
self.assertEquals(len(errors), 0)
|
||||||
self.failIf(commentForm.handleComment(commentForm, "foo"))
|
self.failIf(commentForm.handleComment(commentForm, "foo"))
|
||||||
@ -135,7 +135,7 @@ class TestCommentForm(PloneTestCase):
|
|||||||
commentForm = getMultiAdapter((self.context, request),
|
commentForm = getMultiAdapter((self.context, request),
|
||||||
name=u"comment-form")
|
name=u"comment-form")
|
||||||
commentForm.update()
|
commentForm.update()
|
||||||
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
||||||
|
|
||||||
self.assertEquals(len(errors), 0)
|
self.assertEquals(len(errors), 0)
|
||||||
self.failIf(commentForm.handleComment(commentForm, "action"))
|
self.failIf(commentForm.handleComment(commentForm, "action"))
|
||||||
@ -163,7 +163,7 @@ class TestCommentForm(PloneTestCase):
|
|||||||
commentForm = getMultiAdapter((self.context, request),
|
commentForm = getMultiAdapter((self.context, request),
|
||||||
name=u"comment-form")
|
name=u"comment-form")
|
||||||
commentForm.update()
|
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
|
# No form errors, but raise unauthorized because discussion is not
|
||||||
# allowed
|
# allowed
|
||||||
@ -199,7 +199,7 @@ class TestCommentForm(PloneTestCase):
|
|||||||
commentForm = getMultiAdapter((self.context, request),
|
commentForm = getMultiAdapter((self.context, request),
|
||||||
name=u"comment-form")
|
name=u"comment-form")
|
||||||
commentForm.update()
|
commentForm.update()
|
||||||
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
data, errors = commentForm.extractData() # pylint: disable-msg=W0612
|
||||||
|
|
||||||
self.assertEquals(len(errors), 0)
|
self.assertEquals(len(errors), 0)
|
||||||
self.assertRaises(Unauthorized,
|
self.assertRaises(Unauthorized,
|
||||||
@ -235,7 +235,7 @@ class TestCommentsViewlet(PloneTestCase):
|
|||||||
|
|
||||||
Second paragraph"""
|
Second paragraph"""
|
||||||
self.assertEquals(self.viewlet.cook(text),
|
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):
|
def test_cook_no_html(self):
|
||||||
text = """<b>Got HTML?</b>"""
|
text = """<b>Got HTML?</b>"""
|
||||||
@ -314,7 +314,6 @@ class TestCommentsViewlet(PloneTestCase):
|
|||||||
"Plain text formatting. Web and email addresses are transformed " +
|
"Plain text formatting. Web and email addresses are transformed " +
|
||||||
"into clickable links.")
|
"into clickable links.")
|
||||||
|
|
||||||
|
|
||||||
def test_has_replies(self):
|
def test_has_replies(self):
|
||||||
self.assertEquals(self.viewlet.has_replies(), False)
|
self.assertEquals(self.viewlet.has_replies(), False)
|
||||||
comment = createObject('plone.Comment')
|
comment = createObject('plone.Comment')
|
||||||
@ -464,5 +463,6 @@ class TestCommentsViewlet(PloneTestCase):
|
|||||||
localized_time = self.viewlet.format_time(python_time)
|
localized_time = self.viewlet.format_time(python_time)
|
||||||
self.assertEquals(localized_time, "Feb 01, 2009 11:32 PM")
|
self.assertEquals(localized_time, "Feb 01, 2009 11:32 PM")
|
||||||
|
|
||||||
|
|
||||||
def test_suite():
|
def test_suite():
|
||||||
return unittest.defaultTestLoader.loadTestsFromName(__name__)
|
return unittest.defaultTestLoader.loadTestsFromName(__name__)
|
||||||
|
@ -99,6 +99,7 @@ class ConversationIndexersTest(PloneTestCase):
|
|||||||
#self.assert_(isinstance(catalog.commentators,
|
#self.assert_(isinstance(catalog.commentators,
|
||||||
# DelegatingIndexerFactory))
|
# DelegatingIndexerFactory))
|
||||||
|
|
||||||
|
|
||||||
class CommentIndexersTest(PloneTestCase):
|
class CommentIndexersTest(PloneTestCase):
|
||||||
|
|
||||||
layer = DiscussionLayer
|
layer = DiscussionLayer
|
||||||
@ -145,7 +146,7 @@ class CommentIndexersTest(PloneTestCase):
|
|||||||
|
|
||||||
self.conversation.addComment(comment_long)
|
self.conversation.addComment(comment_long)
|
||||||
self.assertEquals(catalog.description(comment_long)(),
|
self.assertEquals(catalog.description(comment_long)(),
|
||||||
LONG_TEXT_CUT.replace("\n", ""))
|
LONG_TEXT_CUT.replace("\n", " "))
|
||||||
|
|
||||||
def test_dates(self):
|
def test_dates(self):
|
||||||
# Test if created, modified, effective etc. are set correctly
|
# Test if created, modified, effective etc. are set correctly
|
||||||
@ -171,5 +172,6 @@ class CommentIndexersTest(PloneTestCase):
|
|||||||
# object the comment was added to
|
# object the comment was added to
|
||||||
self.assertEquals(catalog.in_response_to(self.comment)(), 'Document 1')
|
self.assertEquals(catalog.in_response_to(self.comment)(), 'Document 1')
|
||||||
|
|
||||||
|
|
||||||
def test_suite():
|
def test_suite():
|
||||||
return unittest.defaultTestLoader.loadTestsFromName(__name__)
|
return unittest.defaultTestLoader.loadTestsFromName(__name__)
|
||||||
|
Loading…
Reference in New Issue
Block a user