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