7649: [Unit test] gramps type, encoding and to_struct(); specific to python2

This commit is contained in:
Jérôme Rapinat 2014-05-07 17:15:26 +02:00
parent a611678f37
commit 5dc84c83a9

View File

@ -37,7 +37,7 @@ from __future__ import unicode_literals
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from ..const import GRAMPS_LOCALE as glocale from ..const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext _ = glocale.translation.gettext
from ..constfunc import STRTYPE from ..constfunc import STRTYPE, cuni
_UNKNOWN = _('Unknown') _UNKNOWN = _('Unknown')
@ -235,7 +235,7 @@ class GrampsType(GrampsTypeC):
""" """
return {"_class": self.__class__.__name__, return {"_class": self.__class__.__name__,
"value": self.__value, "value": self.__value,
"string": str(self)} "string": cuni(self)}
@classmethod @classmethod
def from_struct(cls, struct): def from_struct(cls, struct):