Index: main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_converters.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_converters.py	(revision 7858)
+++ main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_converters.py	(revision 7932)
@@ -33,8 +33,10 @@
 from waeup.kofa.app import University
 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
+from waeup.kofa.interfaces import (
+    SimpleKofaVocabulary, SubjectSource, GradeSource)
+from waeup.kofa.schoolgrades import ResultEntryField
 from waeup.kofa.university import Faculty
 from waeup.kofa.utils.converters import IObjectConverter
 from waeup.kofa.utils.helpers import attrs_to_fields
-from waeup.kofa.interfaces import SimpleKofaVocabulary
 
 colors = SimpleKofaVocabulary(
@@ -85,4 +87,17 @@
         vocabulary = car_nums,
         )
+    grades = schema.List(
+        title = u'School Grades',
+        value_type = ResultEntryField(),
+        required = True,
+        default = [],
+        )
+    friends = schema.List(
+        title = u'Friends',
+        value_type = schema.TextLine(
+            title = u'Name',
+            )
+        )
+
     @invariant
     def kevinIsYoung(contact):
@@ -330,2 +345,31 @@
         assert data['num_cars'] == 1
         return
+
+    def test_list_of_textlines(self):
+        # We can convert lists of text lines
+        converter = IObjectConverter(IContact)
+        err, inv_err, data = converter.fromStringDict(
+            {"friends": "['Fred', 'Wilma']"}, 'contact')
+        self.assertEqual(
+            data, {'friends': ['Fred', 'Wilma']})
+        return
+
+    def test_list_of_resultentries(self):
+        # We can handle lists of result entries
+        converter = IObjectConverter(IContact)
+        # get currently valid values
+        s_src, g_src = SubjectSource(), GradeSource()
+        s_val1, s_val2 = list(s_src.factory.getValues())[0:2]
+        g_val1, g_val2 = list(g_src.factory.getValues())[0:2]
+        req_string = u"[('%s', '%s'), ('%s', '%s')]" % (
+                s_val1, g_val1, s_val2, g_val2)
+        err, inv_err, data = converter.fromStringDict(
+            {"grades": req_string,
+             },
+            'contact')
+        result_grades = data['grades']
+        self.assertTrue(isinstance(result_grades, list))
+        self.assertEqual(len(result_grades), 2)
+        self.assertEqual(result_grades[0].subject, s_val1)
+        self.assertEqual(result_grades[0].grade, g_val1)
+        return
