def test_description_i18n(self): fti = DexterityFTI('testtype', description='t\xc3\xa9st') # with no i18n domain, we get the UTF8-encoded title self.assertEqual('t\xc3\xa9st', fti.Description()) # with an i18n domain, we get a Message fti.i18n_domain = 'test' msgid = fti.Description() self.assertEqual('t\xe9st', msgid) self.assertEqual('test', msgid.domain)