Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py	(revision 7927)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py	(revision 7933)
@@ -16,5 +16,5 @@
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 ##
-"""Unit tests for applicants-related data importers.
+"""Unit tests for applicants-related data processors.
 """
 import datetime
@@ -29,5 +29,5 @@
 from waeup.kofa.app import University
 from waeup.kofa.applicants.batching import (
-    ApplicantsContainerImporter, ApplicantImporter)
+    ApplicantsContainerProcessor, ApplicantProcessor)
 from waeup.kofa.applicants.container import ApplicantsContainer
 from waeup.kofa.applicants.applicant import Applicant
@@ -66,10 +66,10 @@
     '\n')[0].split(',')
 
-class ApplicantsContainerImporterTest(FunctionalTestCase):
+class ApplicantsContainerProcessorTest(FunctionalTestCase):
 
     layer = FunctionalLayer
 
     def setUp(self):
-        super(ApplicantsContainerImporterTest, self).setUp()
+        super(ApplicantsContainerProcessorTest, self).setUp()
 
         # Setup a sample site for each test
@@ -85,5 +85,5 @@
         self.app['applicants']['dp2011'] = self.container
 
-        self.importer = ApplicantsContainerImporter()
+        self.processor = ApplicantsContainerProcessor()
         self.workdir = tempfile.mkdtemp()
         self.csv_file = os.path.join(self.workdir, 'sampledata.csv')
@@ -93,5 +93,5 @@
 
     def tearDown(self):
-        super(ApplicantsContainerImporterTest, self).tearDown()
+        super(ApplicantsContainerProcessorTest, self).tearDown()
         shutil.rmtree(self.workdir)
         shutil.rmtree(self.dc_root)
@@ -101,35 +101,35 @@
     def test_interface(self):
         # Make sure we fulfill the interface contracts.
-        assert verifyObject(IBatchProcessor, self.importer) is True
+        assert verifyObject(IBatchProcessor, self.processor) is True
         assert verifyClass(
-            IBatchProcessor, ApplicantsContainerImporter) is True
+            IBatchProcessor, ApplicantsContainerProcessor) is True
 
     def test_parentsExist(self):
-        assert self.importer.parentsExist(None, dict()) is False
-        assert self.importer.parentsExist(None, self.app) is True
+        assert self.processor.parentsExist(None, dict()) is False
+        assert self.processor.parentsExist(None, self.app) is True
 
     def test_entryExists(self):
-        assert self.importer.entryExists(
+        assert self.processor.entryExists(
             dict(code='REG_NONE'), self.app) is False
-        assert self.importer.entryExists(
+        assert self.processor.entryExists(
             dict(code='dp2011'), self.app) is True
 
     def test_getParent(self):
-        parent = self.importer.getParent(None, self.app)
+        parent = self.processor.getParent(None, self.app)
         assert parent is self.app['applicants']
 
     def test_getEntry(self):
-        assert self.importer.getEntry(
+        assert self.processor.getEntry(
             dict(code='REG_NONE'), self.app) is None
-        assert self.importer.getEntry(
+        assert self.processor.getEntry(
             dict(code='dp2011'), self.app) is self.container
 
     def test_addEntry(self):
-        self.importer.addEntry(
+        self.processor.addEntry(
             'New application', dict(code='dp2012'), self.app)
         assert self.app['applicants']['dp2012'] == 'New application'
 
     def test_delEntry(self):
-        self.importer.delEntry(dict(code='dp2011'), self.app)
+        self.processor.delEntry(dict(code='dp2011'), self.app)
         assert 'dp2011' not in self.app['applicants'].keys()
 
@@ -137,5 +137,5 @@
         # Do a real import
         # see local sample_container.csv file for input
-        num, num_warns, fin_file, fail_file = self.importer.doImport(
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, APPS_CONTAINER_HEADER_FIELDS)
         avail_containers = [x for x in self.app['applicants'].keys()]
@@ -219,11 +219,11 @@
         return
 
-class ApplicantImporterTest(ApplicantImportExportSetup):
+class ApplicantProcessorTest(ApplicantImportExportSetup):
 
     layer = FunctionalLayer
 
     def setUp(self):
-        super(ApplicantImporterTest, self).setUp()
-        self.importer = ApplicantImporter()
+        super(ApplicantProcessorTest, self).setUp()
+        self.processor = ApplicantProcessor()
         self.csv_file = os.path.join(self.workdir, 'sample_applicant_data.csv')
         self.csv_file_faulty = os.path.join(self.workdir,
@@ -237,15 +237,15 @@
     def test_interface(self):
         # Make sure we fulfill the interface contracts.
-        assert verifyObject(IBatchProcessor, self.importer) is True
+        assert verifyObject(IBatchProcessor, self.processor) is True
         assert verifyClass(
-            IBatchProcessor, ApplicantImporter) is True
+            IBatchProcessor, ApplicantProcessor) is True
 
     def test_entryExists(self):
-        assert self.importer.entryExists(
+        assert self.processor.entryExists(
             dict(container_code='dp2011', application_number='999'),
             self.app) is False
 
     def test_getEntry(self):
-        applicant = self.importer.getEntry(
+        applicant = self.processor.getEntry(
             dict(container_code='dp2011',
                  application_number=self.application_number), self.app)
@@ -254,5 +254,5 @@
     def test_addEntry(self):
         new_applicant = Applicant()
-        self.importer.addEntry(
+        self.processor.addEntry(
             new_applicant, dict(container_code='dp2011'), self.app)
         assert len(self.app['applicants']['dp2011'].keys()) == 2
@@ -261,5 +261,5 @@
         assert self.application_number in self.app[
             'applicants']['dp2011'].keys()
-        self.importer.delEntry(
+        self.processor.delEntry(
             dict(container_code='dp2011',
                 application_number=self.application_number), self.app)
@@ -268,5 +268,5 @@
 
     def test_import(self):
-        num, num_warns, fin_file, fail_file = self.importer.doImport(
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, APPLICANT_HEADER_FIELDS)
         self.assertEqual(num_warns,0)
@@ -285,5 +285,5 @@
         # when in format xx/yy/zzzz as we cannot say whether it is
         # meant as dd/mm/yyyy or mm/dd/yyyy. We therefore require yyyy-mm-dd
-        num, num_warns, fin_file, fail_file = self.importer.doImport(
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file_faulty, APPLICANT_HEADER_FIELDS)
         if fail_file is not None:
@@ -300,8 +300,8 @@
 
     def test_import_update(self):
-        num, num_warns, fin_file, fail_file = self.importer.doImport(
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, APPLICANT_HEADER_FIELDS)
         shutil.rmtree(os.path.dirname(fin_file))
-        num, num_warns, fin_file, fail_file = self.importer.doImport(
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file_update, APPLICANT_HEADER_FIELDS_UPDATE, 'update')
         self.assertEqual(num_warns,0)
@@ -309,8 +309,8 @@
 
     def test_import_remove(self):
-        num, num_warns, fin_file, fail_file = self.importer.doImport(
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, APPLICANT_HEADER_FIELDS)
         shutil.rmtree(os.path.dirname(fin_file))
-        num, num_warns, fin_file, fail_file = self.importer.doImport(
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file_update, APPLICANT_HEADER_FIELDS_UPDATE, 'remove')
         self.assertEqual(num_warns,0)
