Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_container_data.csv
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_container_data.csv	(revision 8311)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_container_data.csv	(revision 8314)
@@ -1,7 +1,7 @@
-code,title,prefix,entry_level,year,application_category,description,startdate,enddate,strict_deadline,mode
-app2012,General Studies 2012/2013,app,100,2012,basic,"This text can been seen by anonymous users.
+code,title,prefix,year,application_category,description,startdate,enddate,strict_deadline,mode
+app2012,General Studies 2012/2013,app,2012,basic,"This text can been seen by anonymous users.
 >>de<<
 Dieser Text kann von anonymen Benutzern gelesen werden.",2012-03-01,2012-04-25,1,create
-app2013,General Studies 2013/2014,app,100,2012,basic,"This text can been seen by anonymous users.
+app2013,General Studies 2013/2014,app,2012,basic,"This text can been seen by anonymous users.
 >>de<<
 Dieser Text kann von anonymen Benutzern gelesen werden.",2013-03-01,2013-04-25,1,create
Index: main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py	(revision 8311)
+++ main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py	(revision 8314)
@@ -20,5 +20,5 @@
 """
 import os
-from hurry.workflow.interfaces import IWorkflowInfo
+from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
 from zope.component import getUtility
 from waeup.kofa.testing import FunctionalLayer
@@ -54,8 +54,5 @@
         (success, msg) = self.applicant.createStudent()
         self.assertTrue(msg == 'Applicant has not yet been admitted.')
-        IWorkflowInfo(self.applicant).fireTransition('start')
-        IWorkflowInfo(self.applicant).fireTransition('pay')
-        IWorkflowInfo(self.applicant).fireTransition('submit')
-        IWorkflowInfo(self.applicant).fireTransition('admit')
+        IWorkflowState(self.applicant).setState('admitted')
         (success, msg) = self.applicant.createStudent()
         self.assertTrue(msg == 'No course admitted provided.')
@@ -99,4 +96,27 @@
         self.assertMatches('...John Tester...', self.browser.contents)
 
+    def test_batch_copying(self):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.manage_path)
+        self.fill_correct_values()
+        self.browser.getControl("Save").click()
+        # Upload a passport picture
+        ctrl = self.browser.getControl(name='form.passport')
+        file_obj = open(
+            os.path.join(os.path.dirname(__file__), 'test_image.jpg'),'rb')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(file_obj, filename='my_photo.jpg')
+        self.browser.getControl("Save").click() # submit form
+        IWorkflowState(self.applicant).setState('admitted')
+        self.browser.getControl(name="form.course_admitted").value = ['CERT1']
+        self.browser.getControl("Save").click()
+        self.browser.open(self.manage_container_path)
+        self.browser.getControl("Create students from selected", index=0).click()
+        self.assertTrue('No applicant selected' in self.browser.contents)
+        ctrl = self.browser.getControl(name='val_id')
+        ctrl.getControl(value=self.applicant.application_number).selected = True
+        self.browser.getControl("Create students from selected", index=0).click()
+        self.assertTrue('1 students successfully created' in self.browser.contents)
+
     def test_copier_wo_passport(self):
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
@@ -104,8 +124,5 @@
         self.fill_correct_values()
         # Let's try to create the student
-        IWorkflowInfo(self.applicant).fireTransition('start')
-        IWorkflowInfo(self.applicant).fireTransition('pay')
-        IWorkflowInfo(self.applicant).fireTransition('submit')
-        IWorkflowInfo(self.applicant).fireTransition('admit')
+        IWorkflowState(self.applicant).setState('admitted')
         self.browser.getControl(name="form.course_admitted").value = ['CERT1']
         self.browser.getControl("Save").click()
