Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_faulty_applicant_data.csv
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_faulty_applicant_data.csv	(revision 8608)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_faulty_applicant_data.csv	(revision 8609)
@@ -1,2 +1,3 @@
 application_number,container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename,password
 ,dp2011,1001,Aaren,Pieri,01/02/1990,xx@yy.zz,CERT1,m,Claus,
+5678,dp2011,1005,Jim,Knopf,1990-01-06,xx@yy.zz,CERT2,m,,
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 8608)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py	(revision 8609)
@@ -316,14 +316,9 @@
 
     def test_import_faulty(self):
+        num, num_warns, fin_file, fail_file = self.processor.doImport(
+            self.csv_file_faulty, APPLICANT_HEADER_FIELDS)
         # we cannot import data with faulty dates. A date is faulty
         # 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.processor.doImport(
-            self.csv_file_faulty, APPLICANT_HEADER_FIELDS)
-        if fail_file is not None:
-            fail_contents = open(fail_file, 'rb').read()
-            shutil.rmtree(os.path.dirname(fail_file))
-        else:
-            shutil.rmtree(os.path.dirname(fin_file))
         for applicant in self.app['applicants']['dp2011'].values():
             if applicant.date_of_birth == datetime.date(1990, 1, 2):
@@ -331,4 +326,8 @@
                     'Wrong birthdate of imported applicant '
                     '(1990-01-02, should be: 1990-02-01)')
+        # CERT2 does not exist.
+        fail_contents = open(fail_file, 'rb').read()
+        shutil.rmtree(os.path.dirname(fail_file))
+        self.assertTrue('course1: Invalid value' in fail_contents)
         return
 
