[PATCH 6 of 6 saem_ref] [test] Toward py3k

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Mar 16 10:46:35 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1489576171 -3600
#      Wed Mar 15 12:09:31 2017 +0100
# Node ID cc0bc874a3d4328919522997c5670f83cabda391
# Parent  a6ecc94cec9d3d91868ab20f911b9557b13ba998
[test] Toward py3k

who knows?

diff --git a/test/test_entities_rdf.py b/test/test_entities_rdf.py
--- a/test/test_entities_rdf.py
+++ b/test/test_entities_rdf.py
@@ -15,10 +15,12 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """Tests for agent entities"""
 
 import datetime
 
+from six import text_type
+
 from logilab.common.decorators import monkeypatch
 
 from cubicweb.devtools.testlib import CubicWebTC
 
 from cubes.skos.rdfio import RDFLibRDFGraph, RDFRegistry
@@ -74,11 +76,11 @@ class RDFExportTC(testutils.XmlTestMixin
             (activity_url, self.uri('prov:startedAtTime'), activity.start),
             (activity_url, self.uri('prov:endedAtTime'), activity.end),
         ], triples)
 
     def uri(self, s):
-        return unicode(self.reg.normalize_uri(s))
+        return text_type(self.reg.normalize_uri(s))
 
     def test_organization_unit(self):
         with self.admin_access.client_cnx() as cnx:
             agent = testutils.agent(cnx, u'John Doe')
             ou = testutils.organization_unit(cnx, u'Acme Inc.',


More information about the saem-devel mailing list