Ignore:
Timestamp:
4 Dec 2011, 12:59:40 (13 years ago)
Author:
Henrik Bettermann
Message:

Add tests for applicant batch importer.

Make reg_no filed unique.

Two tests still fail because the importer only accepts the application_number as location field and does not yet search for registration numbers.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py

    r7261 r7263  
    130130    def delEntry(self, row, site):
    131131        student = self.entryExists(row, site)
    132         if student:
     132        if student is not None:
    133133            parent = self.getParent(row, site)
    134134            del parent[student.student_id]
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_batching.py

    r7256 r7263  
    5454
    5555STUDENT_HEADER_FIELDS_UPDATE2 = STUDENT_SAMPLE_DATA_UPDATE2.split(
    56     '\n')[0].split(',')
    57 
    58 STUDENT_SAMPLE_DATA = open(
    59     os.path.join(os.path.dirname(__file__), 'sample_student_data.csv'),
    60     'rb').read()
    61 
    62 STUDENT_HEADER_FIELDS = STUDENT_SAMPLE_DATA.split(
    6356    '\n')[0].split(',')
    6457
Note: See TracChangeset for help on using the changeset viewer.