Back to index

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

List of all members.

Public Member Functions

def test_set

Detailed Description

Definition at line 51 of file test_unicode.py.


Member Function Documentation

Definition at line 53 of file test_unicode.py.

00053 
00054     def test_set(self):
00055         instance = Dummy()
00056         f = StringField('test')
00057         f.set(instance, 'h\xc3\xa9h\xc3\xa9h\xc3\xa9')
00058         self.failUnlessEqual(f.get(instance), 'h\xc3\xa9h\xc3\xa9h\xc3\xa9')
00059         self.failUnlessEqual(f.get(instance, encoding="ISO-8859-1"), 'héhéhé')
00060         f.set(instance, 'héhéhé', encoding='ISO-8859-1')
00061         self.failUnlessEqual(f.get(instance), 'h\xc3\xa9h\xc3\xa9h\xc3\xa9')
00062         self.failUnlessEqual(f.get(instance, encoding="ISO-8859-1"), 'héhéhé')
00063         f.set(instance, u'héhéhé')
00064         self.failUnlessEqual(f.get(instance), 'h\xc3\xa9h\xc3\xa9h\xc3\xa9')
00065         self.failUnlessEqual(f.get(instance, encoding="ISO-8859-1"), 'héhéhé')
00066 


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