- Timestamp:
- 21 Jul 2010, 14:41:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.widgets.core/trunk/src/waeup/widgets/core/tests/test_dictwidget.py
r5293 r5294 50 50 from waeup.widgets.core.dictwidget import DictWidget, DictDisplayWidget 51 51 52 def FieldFactory(**kw): 53 kw.update({ 54 '__name__': u'foo', 55 'key_type': TextLine(__name__=u'bar',title=u'bar'), 56 'value_type': TextLine(__name__=u'baz',title=u'baz')}) 57 return Dict(**kw) 58 59 class ITestContent(Interface): 60 foo = FieldFactory( 61 title=u'Foo Title', 62 description=u'', 63 ) 64 65 class TestObject(object): 66 implements(ITestContent) 67 52 68 class DictWidgetTestHelper(object): 53 69 54 70 def setUpContent(self, desc=u'', title=u'Foo Title'): 55 class ITestContent(Interface):56 foo = self._FieldFactory(57 title=title,58 description=desc,59 )60 class TestObject(object):61 implements(ITestContent)62 63 71 self.content = TestObject() 64 72 self.field = ITestContent['foo'].bind(self.content) … … 74 82 def tearDown(self): 75 83 traversingTearDown() 76 77 def _FieldFactory(self, **kw):78 kw.update({79 '__name__': u'foo',80 'key_type': TextLine(__name__=u'bar',title=u'bar'),81 'value_type': TextLine(__name__=u'baz',title=u'baz')})82 return Dict(**kw)83 84 84 85
Note: See TracChangeset for help on using the changeset viewer.