Back to index

plone3  3.1.7
Public Member Functions
Archetypes.tests.test_unicode.UnicodeTextFieldTest Class Reference
Inheritance diagram for Archetypes.tests.test_unicode.UnicodeTextFieldTest:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.tests.test_unicode.UnicodeTextFieldTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_set

Detailed Description

Definition at line 100 of file test_unicode.py.


Member Function Documentation

Definition at line 102 of file test_unicode.py.

00102 
00103     def test_set(self):
00104         instance = Dummy()
00105         f = TextField('test')
00106         f.set(instance, 'h\xc3\xa9h\xc3\xa9h\xc3\xa9', mimetype='text/plain')
00107         self.failUnlessEqual(f.getRaw(instance), 'h\xc3\xa9h\xc3\xa9h\xc3\xa9')
00108         self.failUnlessEqual(f.getRaw(instance, encoding="ISO-8859-1"), 'héhéhé')
00109         f.set(instance, 'héhéhé', encoding='ISO-8859-1', mimetype='text/plain')
00110         self.failUnlessEqual(f.getRaw(instance), 'h\xc3\xa9h\xc3\xa9h\xc3\xa9')
00111         self.failUnlessEqual(f.getRaw(instance, encoding="ISO-8859-1"), 'héhéhé')
00112         f.set(instance, u'héhéhé', mimetype='text/plain')
00113         self.failUnlessEqual(f.getRaw(instance), 'h\xc3\xa9h\xc3\xa9h\xc3\xa9')
00114         self.failUnlessEqual(f.getRaw(instance, encoding="ISO-8859-1"), 'héhéhé')
00115 


The documentation for this class was generated from the following file: