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