# HG changeset patch # User Julien Cristau # Date 1444056852 -7200 # Node ID 2ff5afce3216fdb9e45e7590366850a461cb1f58 # Parent a688ef1a12eb5266b606fb33d8135735f0d6cf29 [web/test] unicode → cubicweb._ diff -r a688ef1a12eb -r 2ff5afce3216 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', '')])