예제 #1
0
 def test_converter_empty_value(self):
     from plone.app.widgets.dx import QueryStringDataConverter
     converter = QueryStringDataConverter(List(), None)
     self.assertEqual(converter.toFieldValue(u''), None)
     self.assertEqual(converter.toFieldValue(u'[]'), None)
예제 #2
0
 def test_converter_toWidgetValue(self):
     from plone.app.widgets.dx import QueryStringDataConverter
     converter = QueryStringDataConverter(List(), None)
     self.assertEqual(converter.toWidgetValue(None), u'[]')
     self.assertEqual(converter.toWidgetValue([]), u'[]')