Changeset 5296 for main/waeup.widgets.core/trunk/src/waeup/widgets
- Timestamp:
- 21 Jul 2010, 14:46:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.widgets.core/trunk/src/waeup/widgets/core/tests/test_dictwidget.py
r5294 r5296 208 208 'field.foo.value.0.baz': u'world!', 209 209 'field.foo.count': u'1'}) 210 #widget = DictWidget(211 # self.field, self.field.value_type, request)212 210 widget = DictWidget( 213 211 self.field, request) … … 258 256 'field.foo.remove': u'Remove selected items', 259 257 'field.foo.count': u'2'}) 260 #widget = TupleSequenceWidget( 261 # self.field, self.field.value_type, request) 262 widget = DictWidget( 263 self.field, request) 264 #widget.setRenderedValue(((u'existing', u'one'), (u'second', u'entry'))) 265 #widget.setRenderedValue({u'existing': u'one', u'other': u'entry'}) 258 widget = DictWidget( 259 self.field, request) 266 260 widget.setRenderedValue({u'other': u'entry', u'existing': u'one'}) 267 #a = widget.getInputValue()268 #print "AAAAAAAAAAAAAAAA: ", a269 261 self.assertEquals(widget.getInputValue(), {u'second': u'entry'}) 270 #self.assertEquals(a, {u'second': u'entry'})271 262 output = widget() 272 #print "WIDGET_OUTPUT: ", output273 263 check_list = ( 274 264 'checkbox', 'field.foo.remove_0', … … 281 271 'field.foo.count" value="2"', 282 272 ) 283 #self.verifyResult(widget(), check_list, inorder=True)284 273 self.verifyResult(output, check_list, inorder=True) 285 274 … … 287 276 request = TestRequest() 288 277 self.field.min_length = 2 289 #widget = TupleSequenceWidget(290 # self.field, self.field.value_type, request)291 278 widget = DictWidget( 292 279 self.field, request) … … 299 286 ) 300 287 s = widget() 301 #print "S: "302 #print s303 288 self.verifyResult(s, check_list, inorder=True) 304 289 self.assertEquals(s.find('checkbox'), -1) … … 353 338 """Test that errors on subwidgets appear 354 339 355 >>> #field = Tuple(__name__=u'foo',356 >>> # value_type=TextLine(__name__='bar'))357 340 >>> field = Dict(__name__=u'foo', 358 341 ... key_type=TextLine(__name__='bar',title=u'bar'), … … 364 347 ... 'field.foo.value.1.baz': u'entry', 365 348 ... 'field.foo.count': u'2'}) 366 >>> #widget = TupleSequenceWidget(field, field.value_type, request)367 349 >>> widget = DictWidget(field, request) 368 350 … … 417 399 418 400 def _WidgetFactory(self, *args, **kw): 419 #w = SequenceDisplayWidget(*args, **kw)420 401 w = DictDisplayWidget(*args, **kw) 421 402 w.cssClass = "testwidget" … … 425 406 self.setUpContent() 426 407 self.request = TestRequest() 427 #self.widget = self._WidgetFactory(428 # self.field, self.field.value_type, self.request)429 408 self.widget = self._WidgetFactory( 430 409 self.field, self.request) … … 460 439 461 440 def test_render_alternate_cssClass(self): 462 #self.content.foo = (u'one value',)463 441 self.content.foo = {u'one': u'value'} 464 442 check_list = ['<ol', 'class=', 'altclass',
Note: See TracChangeset for help on using the changeset viewer.