Ignore:
Timestamp:
26 Apr 2012, 17:01:32 (13 years ago)
Author:
Henrik Bettermann
Message:

Enable import of password and state. When application_number is given in create mode, construct applicant_id accordingly (do not use id generator) and store applicant with this application_number in the respective container. Attention: application_number can be any string.

More tests will follow.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data.csv

    r8202 r8290  
    1 container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename
    2 dp2011,1001,Aaren,Pieri,1990-01-02,xx@yy.zz,CERT1,m,Peter
    3 dp2011,1002,Aaren,Finau,1990-01-03,xx@yy.zz,CERT1,m,Claus
    4 dp2011,1003,Aaren,Berson,1990-01-04,xx@yy.zz,CERT1,m,Alfons
     1application_number,container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename
     21234,dp2011,1001,Aaren,Pieri,1990-01-02,xx@yy.zz,CERT1,m,Peter
     32345,dp2011,1002,Aaren,Finau,1990-01-03,xx@yy.zz,CERT1,m,Claus
     4,dp2011,1003,Aaren,Berson,1990-01-04,xx@yy.zz,CERT1,m,Alfons
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update.csv

    r8202 r8290  
    1 container_code,reg_number,firstname,middlename
    2 dp2011,1001,Aaren,
    3 dp2011,1002,Alfons,
    4 dp2011,1003,Abraham,
     1container_code,reg_number,firstname,middlename,state
     2dp2011,1001,Aaren,,
     3dp2011,1002,Alfons,,admitted
     4dp2011,1003,Abraham,,
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update2.csv

    r8202 r8290  
    1 container_code,reg_number,firstname,middlename
    2 dp2011,1001,Aaren,XXX
    3 dp2011,1002,Alfons,XXX
    4 dp2011,1003,Abraham,XXX
     1container_code,reg_number,firstname,middlename,application_number
     2dp2011,1001,Aaren,XXX,
     3dp2011,1002,Alfons,XXX,
     4dp2011,1003,Abraham,XXX,
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_faulty_applicant_data.csv

    r8202 r8290  
    1 container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename
    2 dp2011,1001,Aaren,Pieri,01/02/1990,xx@yy.zz,CERT1,m,Claus
     1application_number,container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename
     2,dp2011,1001,Aaren,Pieri,01/02/1990,xx@yy.zz,CERT1,m,Claus
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py

    r8202 r8290  
    311311        num, num_warns, fin_file, fail_file = self.processor.doImport(
    312312            self.csv_file_update, APPLICANT_HEADER_FIELDS_UPDATE, 'update')
     313        #content = open(fail_file).read()
    313314        self.assertEqual(num_warns,0)
    314315        # The middlename import value was None.
     
    320321                break
    321322        self.assertEqual(applicant.middlename, 'Peter')
     323        # state of Pieri has not changed
     324        self.assertEqual(container['1234'].state,'initialized')
     325        # state of Finau has changed
     326        self.assertEqual(container['2345'].state,'admitted')
    322327        shutil.rmtree(os.path.dirname(fin_file))
    323328        # Now we import another file which clears all middlename attributes.
Note: See TracChangeset for help on using the changeset viewer.