Functional test for special characters added. Remove unnecessary decode statement from creator.

svn path=/plone.app.discussion/trunk/; revision=40502
This commit is contained in:
Timo Stollenwerk 2010-10-04 13:48:27 +00:00
parent b06ba43a75
commit 0ee649fb6c
2 changed files with 18 additions and 2 deletions

View File

@ -161,6 +161,22 @@ Now we can post an anonymous comment.
>>> 'This is an anonymous comment' in unprivileged_browser.contents
True
Make sure special characters work as well.
>>> unprivileged_browser.open(urldoc1)
>>> unprivileged_browser.getControl(name='form.widgets.author_name').value = "Tarek Ziadé"
>>> unprivileged_browser.getControl(name='form.widgets.text').value = "This is an äüö comment"
>>> unprivileged_browser.getControl(name='form.buttons.comment').click()
>>> 'Tarek Ziadé' in unprivileged_browser.contents
True
>>> 'says' in unprivileged_browser.contents
True
>>> 'This is an äüö comment' in unprivileged_browser.contents
True
Reply to an existing comment
----------------------------

View File

@ -75,11 +75,11 @@ class CommentTest(PloneTestCase):
def test_title_special_characters(self):
self.portal.invokeFactory(id='doc_sp_chars',
title='Document äüö',
title=u'Document äüö',
type_name='Document')
conversation = IConversation(self.portal.doc_sp_chars)
comment1 = createObject('plone.Comment')
comment1.creator = "Tarek Ziadé"
comment1.creator = u"Tarek Ziadé"
conversation.addComment(comment1)
self.assertEquals(u"Tarek Ziadé on Document äüö", comment1.Title())