Changeset 12981 for main/waeup.kofa/trunk
- Timestamp:
- 22 May 2015, 07:17:29 (10 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r12971 r12981 4 4 1.3.2.dev0 (unreleased) 5 5 ======================= 6 7 * Remove quite old bug in `doImport`: Replace empty strings *and* lists with 8 ignore-markers in update *and* create mode. 6 9 7 10 * Add StudentUnpaidPaymentExporter to export only unpaid tickets. -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/batchprocessing_browser.txt
r12946 r12981 642 642 >>> print open(pending_file).read() 643 643 name,roles,title,public_name,phone,email,--ERRORS-- 644 anne,['waeup.Nonsense'],Anne Palina, ,+49-234-567,anne@abc.de,roles: invalid role644 anne,['waeup.Nonsense'],Anne Palina,<IGNORE>,+49-234-567,anne@abc.de,roles: invalid role 645 645 646 646 There are many finished-files: -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
r12894 r12981 514 514 "beds_for_pre=['G'], floors_per_block=1, " 515 515 "beds_for_final=['A', 'B'], rooms_per_floor=32, " 516 " blocks_for_male=[],hostel_id=block-a-upper-hostel, "516 "hostel_id=block-a-upper-hostel, " 517 517 "sort_id=20, beds_for_returning=['C', 'D'], " 518 518 "hostel_name=Block A Upper Hostel, beds_for_fresh=['E', 'F'], " 519 "blocks_for_female=['A'] , beds_for_all=[], beds_reserved=[]"519 "blocks_for_female=['A']" 520 520 in logcontent) 521 521 shutil.rmtree(os.path.dirname(fin_file)) … … 542 542 "beds_for_pre=['G'], floors_per_block=1, " 543 543 "beds_for_final=['A', 'B'], rooms_per_floor=32, " 544 " blocks_for_male=[],hostel_id=block-a-upper-hostel, "544 "hostel_id=block-a-upper-hostel, " 545 545 "sort_id=20, beds_for_returning=['C', 'D'], " 546 546 "hostel_name=Block A Upper Hostel, beds_for_fresh=['E', 'F'], " 547 "blocks_for_female=['A'] , beds_for_all=[], beds_reserved=[]"547 "blocks_for_female=['A']" 548 548 in logcontent) 549 549 shutil.rmtree(os.path.dirname(fin_file)) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r12873 r12981 513 513 'reg_number,firstname,student_id,sex,email,phone,state,date_of_birth,lastname,password,matric_number,--ERRORS--\r\n' 514 514 '4,John,D123456,m,aa@aa.ng,1234,nonsense,1990-01-05,Wolter,mypw1,100003,state: not allowed\r\n' 515 '5,John,E123456,x,aa@aa.ng,1234, ,1990-01-06,Kennedy,,100004,sex: Invalid value\r\n'515 '5,John,E123456,x,aa@aa.ng,1234,<IGNORE>,1990-01-06,Kennedy,<IGNORE>,100004,sex: Invalid value\r\n' 516 516 ) 517 517 students = self.app['students'] … … 547 547 '1,Aaren,B123456,m,aa@aa.ng,1234,cleared,1990-01-03,Finau,mypw1,100001,reg_number: Invalid input\r\n' 548 548 '2,Aaren,C123456,m,aa@aa.ng,1234,admitted,1990-01-04,Berson,mypw1,100000,matric_number: Invalid input\r\n' 549 '1,Frank,F123456,m,aa@aa.ng,1234, ,1990-01-06,Meyer,,100000,reg_number: Invalid input; matric_number: Invalid input\r\n'550 '3,Uli,A123456,m,aa@aa.ng,1234, ,1990-01-07,Schulz,,100002,This object already exists.\r\n'549 '1,Frank,F123456,m,aa@aa.ng,1234,<IGNORE>,1990-01-06,Meyer,<IGNORE>,100000,reg_number: Invalid input; matric_number: Invalid input\r\n' 550 '3,Uli,A123456,m,aa@aa.ng,1234,<IGNORE>,1990-01-07,Schulz,<IGNORE>,100002,This object already exists.\r\n' 551 551 ) 552 552 shutil.rmtree(os.path.dirname(fin_file)) … … 780 780 self.assertEqual(studylevel.__parent__.certificate.code, u'CERT1') 781 781 self.assertEqual(studylevel.level_session, 2008) 782 self.assertEqual(studylevel.level_verdict, None)782 self.assertEqual(studylevel.level_verdict, '0') 783 783 self.assertEqual(studylevel.level, 100) 784 784 shutil.rmtree(os.path.dirname(fin_file)) … … 891 891 self.assertEqual(fail_file, 892 892 'reg_number,code,mandatory,level,level_session,score,matric_number,--ERRORS--\r\n' 893 '1,COURSE1, ,nonsense,,5,,Not all parents do exist yet.\r\n'894 '1,NONSENSE, ,100,,5,,code: non-existent\r\n'895 '1,COURSE1, ,200,2004,6,,level_session: does not match 2008\r\n'896 '1,COURSE1, ,300,2008,6,,level: does not exist\r\n'897 '1,COURSE1, ,300,2008X,6,,level_session: Invalid value\r\n')893 '1,COURSE1,<IGNORE>,nonsense,<IGNORE>,5,<IGNORE>,Not all parents do exist yet.\r\n' 894 '1,NONSENSE,<IGNORE>,100,<IGNORE>,5,<IGNORE>,code: non-existent\r\n' 895 '1,COURSE1,<IGNORE>,200,2004,6,<IGNORE>,level_session: does not match 2008\r\n' 896 '1,COURSE1,<IGNORE>,300,2008,6,<IGNORE>,level: does not exist\r\n' 897 '1,COURSE1,<IGNORE>,300,2008X,6,<IGNORE>,level_session: Invalid value\r\n') 898 898 assert self.processor.entryExists( 899 899 dict(reg_number='1', level='100', code='COURSE1'), … … 1220 1220 studycourse = self.processor.getEntry(dict(matric_number='100000'), 1221 1221 self.app) 1222 self.assertEqual(studycourse['200'].level_verdict, None)1222 self.assertEqual(studycourse['200'].level_verdict, '0') 1223 1223 student = self.processor.getParent( 1224 1224 dict(matric_number='100000'), self.app) -
main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
r12869 r12981 384 384 continue 385 385 string_row = self.applyMapping(raw_row, mapping) 386 if ignore_empty and mode in ('update',):387 # Replace empty strings with ignore-markers386 if ignore_empty: 387 # Replace empty strings and empty lists with ignore-markers 388 388 for key, val in string_row.items(): 389 if val == '' :389 if val == '' or val == '[]': 390 390 string_row[key] = IGNORE_MARKER 391 391 row = dict(string_row.items()) # create deep copy
Note: See TracChangeset for help on using the changeset viewer.