Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py	(revision 7912)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py	(revision 7913)
@@ -4,12 +4,17 @@
 import tempfile
 import unittest
-from zope.component import queryUtility, getUtilitiesFor
+from zope.catalog.interfaces import ICatalog
+from zope.component import queryUtility, getUtility, getUtilitiesFor
 from zope.interface.verify import verifyObject, verifyClass
-from waeup.kofa.interfaces import ICSVExporter
-from waeup.kofa.testing import KofaUnitTestLayer
+from zope.intid.interfaces import IIntIds
 from waeup.kofa.applicants import ApplicantsContainer
-from waeup.kofa.applicants.export import ApplicantsContainerExporter
+from waeup.kofa.applicants.export import (
+    ApplicantsContainerExporter, ApplicantsExporter)
 from waeup.kofa.applicants.interfaces import (
     IApplicantsContainerProvider, AppCatSource)
+from waeup.kofa.applicants.tests.test_batching import (
+    ApplicantImportExportSetup)
+from waeup.kofa.interfaces import ICSVExporter
+from waeup.kofa.testing import KofaUnitTestLayer, FunctionalLayer
 
 class ApplicantsContainersExporterTest(unittest.TestCase):
@@ -76,2 +81,47 @@
             )
         return
+
+class ApplicantsExporterTest(ApplicantImportExportSetup):
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(ApplicantsExporterTest, self).setUp()
+        self.outfile = os.path.join(self.workdir, 'myoutput.csv')
+        self.cat = getUtility(ICatalog, name='applicants_catalog')
+        self.intids = getUtility(IIntIds)
+        return
+
+    def test_ifaces(self):
+        # make sure we fullfill interface contracts
+        obj = ApplicantsExporter()
+        verifyObject(ICSVExporter, obj)
+        verifyClass(ICSVExporter, ApplicantsExporter)
+        return
+
+    def test_get_as_utility(self):
+        # we can get an applicant exporter as utility
+        result = queryUtility(ICSVExporter, name="applicants")
+        self.assertTrue(result is not None)
+        return
+
+    def test_export(self):
+        # we can really export applicants
+        # set values we can expect in export file
+        self.applicant.reg_number = u'123456'
+        self.applicant.applicant_id = u'dp2011_654321'
+        intid = self.intids.getId(self.applicant)
+        # reindex modified applicant
+        self.cat.index_doc(intid, self.applicant)
+        exporter = ApplicantsExporter()
+        exporter.export([self.applicant], self.outfile)
+        result = open(self.outfile, 'rb').read()
+        self.assertEqual(
+            result,
+            'reg_number,school_grades,firstname,phone,middlename,lastname,'
+            'lga,screening_score,notice,applicant_id,sex,course2,email,'
+            'date_of_birth,screening_venue,course_admitted,course1\r\n'
+
+            '123456,[],Anna,,,Tester,foreigner,,,dp2011_654321,m,,,,,,\r\n'
+            )
+        return
