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:
parent
b06ba43a75
commit
0ee649fb6c
@ -161,6 +161,22 @@ Now we can post an anonymous comment.
|
|||||||
>>> 'This is an anonymous comment' in unprivileged_browser.contents
|
>>> 'This is an anonymous comment' in unprivileged_browser.contents
|
||||||
True
|
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
|
Reply to an existing comment
|
||||||
----------------------------
|
----------------------------
|
||||||
|
@ -75,11 +75,11 @@ class CommentTest(PloneTestCase):
|
|||||||
|
|
||||||
def test_title_special_characters(self):
|
def test_title_special_characters(self):
|
||||||
self.portal.invokeFactory(id='doc_sp_chars',
|
self.portal.invokeFactory(id='doc_sp_chars',
|
||||||
title='Document äüö',
|
title=u'Document äüö',
|
||||||
type_name='Document')
|
type_name='Document')
|
||||||
conversation = IConversation(self.portal.doc_sp_chars)
|
conversation = IConversation(self.portal.doc_sp_chars)
|
||||||
comment1 = createObject('plone.Comment')
|
comment1 = createObject('plone.Comment')
|
||||||
comment1.creator = "Tarek Ziadé"
|
comment1.creator = u"Tarek Ziadé"
|
||||||
conversation.addComment(comment1)
|
conversation.addComment(comment1)
|
||||||
self.assertEquals(u"Tarek Ziadé on Document äüö", comment1.Title())
|
self.assertEquals(u"Tarek Ziadé on Document äüö", comment1.Title())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user