Ignore:
Timestamp:
17 Jan 2013, 13:03:55 (12 years ago)
Author:
Henrik Bettermann
Message:

Let's create all students from applicants root.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py

    r9544 r9900  
    144144        self.assertTrue('1 students successfully created' in self.browser.contents)
    145145
    146     def test_hidden_batch_copying(self):
     146    def test_hidden_batch_copying_container(self):
    147147        logfile = os.path.join(
    148148            self.app['datacenter'].storage, 'logs', 'applicants.log')
     
    171171        self.assertTrue('1 students successfully created' in self.browser.contents)
    172172
     173    def test_hidden_batch_copying_all(self):
     174        logfile = os.path.join(
     175            self.app['datacenter'].storage, 'logs', 'applicants.log')
     176        self.prepare_applicant()
     177        self.browser.open(self.manage_path)
     178        self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'
     179        #self.browser.getControl(name="form.course_admitted").value = ['CERT1']
     180        self.browser.getControl("Save").click()
     181        IWorkflowState(self.applicant).setState('admitted')
     182        notify(grok.ObjectModifiedEvent(self.applicant))
     183        self.browser.open(self.root_path + '/createallstudents')
     184        self.assertTrue('No student could be created' in self.browser.contents)
     185        logcontent = open(logfile).read()
     186        self.assertTrue('No course admitted provided' in logcontent)
     187        self.applicant.course_admitted = self.certificate
     188        self.browser.open(self.root_path + '/createallstudents')
     189        self.assertTrue('1 students successfully created' in self.browser.contents)
     190
    173191    def test_copier_wo_passport(self):
    174192        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
Note: See TracChangeset for help on using the changeset viewer.