Ignore:
Timestamp:
6 Jun 2012, 10:36:12 (13 years ago)
Author:
Henrik Bettermann
Message:

Copy also entry_mode. Extend tests to check if nothing has been forgotten.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
3 edited

Legend:

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

    r8635 r8637  
    132132        # Save the certificate and set session attributes
    133133        student['studycourse'].certificate = self.course_admitted
     134        student['studycourse'].entry_mode = self.course_admitted.study_mode
    134135        student['studycourse'].entry_session = self.__parent__.year
    135136        student['studycourse'].current_session = self.__parent__.year
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py

    r8636 r8637  
    104104        self.browser.getControl("Search").click()
    105105        self.assertMatches('...John Tester...', self.browser.contents)
     106        # Has the student studycourse the correct attributes?
     107        self.assertEqual(student['studycourse'].certificate.code, 'CERT1')
     108        self.assertEqual(student['studycourse'].entry_session, 2009)
     109        self.assertEqual(student['studycourse'].entry_mode, 'ug_ft')
     110        self.assertEqual(student['studycourse'].current_session, 2009)
     111        self.assertEqual(student['studycourse'].current_level, 100)
    106112
    107113    def test_batch_copying(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r8627 r8637  
    102102        certificate.start_level = 100
    103103        certificate.end_level = 500
     104        certificate.study_mode = u'ug_ft'
    104105        self.certificate = certificate
    105106        self.app['faculties']['fac1'] = Faculty()
Note: See TracChangeset for help on using the changeset viewer.