Ignore:
Timestamp:
2 Apr 2016, 06:10:01 (9 years ago)
Author:
Henrik Bettermann
Message:

Implement matric number constructor for diploma students.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py

    r13755 r13793  
    129129        site['configuration'].next_matric_integer_2 = 1
    130130        site['configuration'].next_matric_integer_3 = 1
     131        site['configuration'].next_matric_integer_4 = 1
    131132        self.student.matric_number = None
    132133        #msg, mnumber = utils.setMatricNumber(self.student)
     
    165166        self.assertEqual(self.student.matric_number, 'AAU/SPS/ABC/dep1/04/AGRB/00001')
    166167        self.assertEqual(site['configuration'].next_matric_integer_3, 2)
     168        # Diploma Students get a matric number with leading 'IOS'
     169        # and the dp counter which is next_matric_integer_3.
     170        self.student['studycourse'].certificate.study_mode = 'dp_ft'
     171        self.student.matric_number = None
     172        msg, mnumber = utils.setMatricNumber(self.student)
     173        self.assertEqual(self.student.matric_number, 'IOE/DIP/04/00001')
     174        self.assertEqual(site['configuration'].next_matric_integer_4, 2)
    167175        # Foundation programme students don't get matric number.
    168176        self.student.matric_number = None
Note: See TracChangeset for help on using the changeset viewer.