# HG changeset patch # User Rémi Cardona # Date 1442570309 -7200 # Node ID 3f4f190f8e353e0675d2aa61042ee5877eb4160b # Parent b261d90149d01eca6061df622b786850ac9e93dc [py3k] unicode → six.text_type diff -r b261d90149d0 -r 3f4f190f8e35 test/unittest_entity.py --- a/test/unittest_entity.py Fri Sep 18 11:54:12 2015 +0200 +++ b/test/unittest_entity.py Fri Sep 18 11:58:29 2015 +0200 @@ -20,6 +20,8 @@ from datetime import datetime +from six import text_type + from logilab.common import tempattr from logilab.common.decorators import clear_cache @@ -771,11 +773,11 @@ # ambiguity test person2 = req.create_entity('Personne', prenom=u'remi', nom=u'doe') person.cw_clear_all_caches() - self.assertEqual(person.rest_path(), unicode(person.eid)) - self.assertEqual(person2.rest_path(), unicode(person2.eid)) + self.assertEqual(person.rest_path(), text_type(person.eid)) + self.assertEqual(person2.rest_path(), text_type(person2.eid)) # unique attr with None value (nom in this case) friend = req.create_entity('Ami', prenom=u'bob') - self.assertEqual(friend.rest_path(), unicode(friend.eid)) + self.assertEqual(friend.rest_path(), text_type(friend.eid)) # 'ref' below is created without the unique but not required # attribute, make sur that the unique _and_ required 'ean' is used # as the rest attribute