From 0ee649fb6c033dd1bfbf4e3029af7ed5c66f9e90 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 4 Oct 2010 13:48:27 +0000 Subject: [PATCH] Functional test for special characters added. Remove unnecessary decode statement from creator. svn path=/plone.app.discussion/trunk/; revision=40502 --- plone/app/discussion/tests/functional.txt | 16 ++++++++++++++++ plone/app/discussion/tests/test_comment.py | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/tests/functional.txt b/plone/app/discussion/tests/functional.txt index 471334b..2834930 100644 --- a/plone/app/discussion/tests/functional.txt +++ b/plone/app/discussion/tests/functional.txt @@ -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 ---------------------------- diff --git a/plone/app/discussion/tests/test_comment.py b/plone/app/discussion/tests/test_comment.py index 61095bb..0feae32 100644 --- a/plone/app/discussion/tests/test_comment.py +++ b/plone/app/discussion/tests/test_comment.py @@ -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())