Example #1
0
 def test_converter_empty_value(self):
     from plone.app.z3cform.converters import QueryStringDataConverter
     converter = QueryStringDataConverter(List(), None)
     self.assertEqual(converter.toFieldValue(u''), None)
     self.assertEqual(converter.toFieldValue(u'[]'), None)
Example #2
0
 def test_converter_empty_value(self):
     from plone.app.z3cform.converters import QueryStringDataConverter
     converter = QueryStringDataConverter(List(), None)
     self.assertEqual(converter.toFieldValue(u''), None)
     self.assertEqual(converter.toFieldValue(u'[]'), None)
Example #3
0
 def test_converter_toWidgetValue(self):
     from plone.app.z3cform.converters import QueryStringDataConverter
     converter = QueryStringDataConverter(List(), None)
     self.assertEqual(converter.toWidgetValue(None), u'[]')
     self.assertEqual(converter.toWidgetValue([]), u'[]')
Example #4
0
 def test_converter_toWidgetValue(self):
     from plone.app.z3cform.converters import QueryStringDataConverter
     converter = QueryStringDataConverter(List(), None)
     self.assertEqual(converter.toWidgetValue(None), u'[]')
     self.assertEqual(converter.toWidgetValue([]), u'[]')