[web/test] unicode → cubicweb._
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 05 Oct 2015 16:54:12 +0200
changeset 10772 2ff5afce3216
parent 10771 a688ef1a12eb
child 10773 5b051dd4a4f5
[web/test] unicode → cubicweb._
web/test/unittest_formfields.py
--- a/web/test/unittest_formfields.py	Mon Oct 05 16:52:26 2015 +0200
+++ b/web/test/unittest_formfields.py	Mon Oct 05 16:54:12 2015 +0200
@@ -21,6 +21,7 @@
 
 from yams.constraints import StaticVocabularyConstraint, SizeConstraint
 
+import cubicweb
 from cubicweb.devtools import TestServerConfiguration
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.web.formwidgets import PasswordInput, TextArea, Select, Radio
@@ -127,7 +128,7 @@
             self.assertIsInstance(field, BooleanField)
             self.assertEqual(field.required, False)
             self.assertIsInstance(field.widget, Radio)
-            self.assertEqual(field.vocabulary(mock(_cw=mock(_=unicode))),
+            self.assertEqual(field.vocabulary(mock(_cw=mock(_=cubicweb._))),
                               [(u'yes', '1'), (u'no', '')])
 
     def test_bool_field_explicit_choices(self):
@@ -135,7 +136,7 @@
             field = guess_field(schema['CWAttribute'], schema['indexed'],
                                 choices=[(u'maybe', '1'), (u'no', '')], req=req)
             self.assertIsInstance(field.widget, Radio)
-            self.assertEqual(field.vocabulary(mock(req=mock(_=unicode))),
+            self.assertEqual(field.vocabulary(mock(req=mock(_=cubicweb._))),
                               [(u'maybe', '1'), (u'no', '')])