Ignore:
Timestamp:
25 Oct 2012, 22:45:08 (12 years ago)
Author:
Henrik Bettermann
Message:

Let's add at least one successful row with imported level_session. checkConversion had to be fixed because level_session was a string.

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

Legend:

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

    r9420 r9421  
    623623        # the parent studylevel exists and if its level_session
    624624        # attribute corresponds with the expected value in row.
    625         level_session = row.get('level_session', IGNORE_MARKER)
    626         if level_session not in (IGNORE_MARKER, ''):
     625        level_session = conv_dict.get('level_session', IGNORE_MARKER)
     626        if level_session not in (IGNORE_MARKER, None):
    627627            site = grok.getSite()
    628628            studylevel = self.getParent(row, site)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_courseticket_data.csv

    r9420 r9421  
    332,,100,COURSE1,2,False,
    44,100002,100,COURSE1,3,False,
     51,,200,COURSE1,1,True,2008
    561,,nonsense,COURSE1,5,,
    671,,100,NONSENSE,5,,
    781,,200,COURSE1,6,,2004
    891,,300,COURSE1,6,,2008
    9 1,,300,COURSE1,6,,200888
     101,,300,COURSE1,6,,2008X
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r9420 r9421  
    743743            '1,COURSE1,,200,2004,6,,level_session: does not match 2008\r\n'
    744744            '1,COURSE1,,300,2008,6,,level: does not exist\r\n'
    745             '1,COURSE1,,300,200888,6,,level_session: Invalid value; level: does not exist\r\n')
     745            '1,COURSE1,,300,2008X,6,,level_session: Invalid value\r\n')
    746746        assert self.processor.entryExists(
    747747            dict(reg_number='1', level='100', code='COURSE1'),
     
    786786            '1,COURSE1,<IGNORE>,200,2004,6,<IGNORE>,level_session: does not match 2008\r\n'
    787787            '1,COURSE1,<IGNORE>,300,2008,6,<IGNORE>,level: does not exist\r\n'
    788             '1,COURSE1,<IGNORE>,300,200888,6,<IGNORE>,level_session: Invalid value; level: does not exist\r\n')
     788            '1,COURSE1,<IGNORE>,300,2008X,6,<IGNORE>,level_session: Invalid value\r\n')
    789789        shutil.rmtree(os.path.dirname(fin_file))
    790790
Note: See TracChangeset for help on using the changeset viewer.