--- 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', '')])