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

This commit is contained in:
Jérôme Rapinat
2014-05-07 20:43:54 +02:00
parent e4f7982479
commit b03ce38514

View File

@@ -39,7 +39,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')
@@ -233,7 +233,7 @@ class GrampsType(GrampsTypeC):
:rtype: dict :rtype: dict
""" """
return {"value": self.__value, return {"value": self.__value,
"string": str(self)} "string": cuni(self)}
def unserialize(self, data): def unserialize(self, data):
"""Convert a serialized tuple of data to an object.""" """Convert a serialized tuple of data to an object."""