hooks/test/unittest_hooks.py
changeset 10724 aa3eedba866c
parent 10336 9c38f674e36f
child 11033 63d860a14a17
--- a/hooks/test/unittest_hooks.py	Mon Sep 21 18:28:10 2015 +0200
+++ b/hooks/test/unittest_hooks.py	Mon Sep 21 18:35:38 2015 +0200
@@ -24,9 +24,12 @@
 
 from datetime import datetime
 
+from six import text_type
+
 from cubicweb import ValidationError, AuthenticationError, BadConnectionId
 from cubicweb.devtools.testlib import CubicWebTC
 
+
 class CoreHooksTC(CubicWebTC):
 
     def test_inlined(self):
@@ -207,7 +210,7 @@
             with self.assertRaises(ValidationError) as cm:
                 cnx.execute('INSERT CWUser X: X login "admin"')
             ex = cm.exception
-            ex.translate(unicode)
+            ex.translate(text_type)
             self.assertIsInstance(ex.entity, int)
             self.assertEqual(ex.errors, {'login-subject': 'the value "admin" is already used, use another one'})