Index: main/waeup.ikoba/trunk/src/waeup/ikoba/utils/tests/test_converters.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/utils/tests/test_converters.py	(revision 12288)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/utils/tests/test_converters.py	(revision 12306)
@@ -23,4 +23,5 @@
 import tempfile
 import unittest
+from decimal import Decimal
 from zope import schema
 from zope.component import provideUtility
@@ -35,10 +36,10 @@
 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
 from waeup.ikoba.interfaces import (
-    SimpleIkobaVocabulary, SubjectSource, GradeSource, IFieldConverter,
+    SimpleIkobaVocabulary, IFieldConverter,
     DELETION_MARKER, IGNORE_MARKER)
-from waeup.ikoba.schoolgrades import ResultEntryField
+from waeup.ikoba.schoolgrades import ProductOptionEntryField
 from waeup.ikoba.utils.converters import (
     IObjectConverter, IFieldConverter, DefaultFieldConverter,
-    ListFieldConverter, PhoneNumberFieldConverter, ResultEntryConverter,
+    ListFieldConverter, PhoneNumberFieldConverter, ProductOptionEntryConverter,
     DefaultObjectConverter)
 from waeup.ikoba.utils.helpers import attrs_to_fields
@@ -91,7 +92,7 @@
         vocabulary = car_nums,
         )
-    grades = schema.List(
-        title = u'School Grades',
-        value_type = ResultEntryField(),
+    options = schema.List(
+        title = u'Options',
+        value_type = ProductOptionEntryField(),
         required = True,
         default = [],
@@ -136,5 +137,5 @@
         obj2 = ListFieldConverter(None)
         obj3 = PhoneNumberFieldConverter(None)
-        obj4 = ResultEntryConverter(None)
+        obj4 = ProductOptionEntryConverter(None)
         verify.verifyObject(IFieldConverter, obj1)
         verify.verifyObject(IFieldConverter, obj2)
@@ -144,5 +145,5 @@
         verify.verifyClass(IFieldConverter, ListFieldConverter)
         verify.verifyClass(IFieldConverter, PhoneNumberFieldConverter)
-        verify.verifyClass(IFieldConverter, ResultEntryConverter)
+        verify.verifyClass(IFieldConverter, ProductOptionEntryConverter)
         return
 
@@ -384,22 +385,20 @@
         return
 
-    def test_list_of_resultentries(self):
+    def test_list_of_optionentries(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)
+        req_string = u"[(u'T1', u'55.6', u'usd'), (u'T2', u'66.6', u'eur')]"
+        err, inv_err, data = converter.fromStringDict(
+            {"options": req_string,}, 'contact')
+        result_options = data['options']
+        self.assertTrue(isinstance(result_options, list))
+        self.assertEqual(len(result_options), 2)
+        self.assertEqual(result_options[0].title, 'T1')
+        self.assertEqual(result_options[0].fee, Decimal('55.6'))
+        self.assertEqual(result_options[0].currency, 'usd')
+        self.assertEqual(result_options[1].title, 'T2')
+        self.assertEqual(result_options[1].fee, Decimal('66.6'))
+        self.assertEqual(result_options[1].currency, 'eur')
         return
 
@@ -420,8 +419,8 @@
         converter = IObjectConverter(IContact)
         err, inv_err, data = converter.fromStringDict(
-            {"grades": DELETION_MARKER,
+            {"options": DELETION_MARKER,
              "friends": DELETION_MARKER},
             'contact', mode='update')
         # grades are about to be set to default, friends to None
-        self.assertEqual(data, {'grades': [], 'friends': None})
-        return
+        self.assertEqual(data, {'options': [], 'friends': None})
+        return
