Changeset 13092 for main


Ignore:
Timestamp:
23 Jun 2015, 06:48:59 (10 years ago)
Author:
Henrik Bettermann
Message:

Adjust exporter and tests.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/export.py

    r12080 r13092  
    2828    """
    2929
     30    # In contrast to ApplicantExporter we export all fields
     31    # and attributes of the interfaces.
    3032    fields = tuple(sorted(set(
    3133        INigeriaUGApplicant.names() +
    3234        INigeriaPGApplicant.names() +
    3335        IApplicantBaseData.names()
    34         ))) + ('container_code',)
     36        )))
    3537
    3638    def mangle_value(self, value, name, context=None):
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py

    r12080 r13092  
    362362        self.assertMatches(result,
    363363            'aggregate,applicant_id,application_date,application_number,'
    364             'course1,course2,course_admitted,date_of_birth,display_fullname,'
    365             'email,emp2_end,emp2_position,emp2_reason,emp2_start,emp_end,'
    366             'emp_position,emp_reason,emp_start,employer,employer2,'
    367             'firstname,history,hq_degree,hq_disc,hq_matric_no,hq_school,'
    368             'hq_session,hq_type,jamb_age,jamb_score,jamb_subjects,lastname,lga,'
    369             'locked,middlename,nationality,notice,nysc_lga,nysc_year,'
    370             'password,phone,pp_school,presently_inst,reg_number,'
    371             'result_uploaded,screening_date,screening_score,'
    372             'screening_venue,sex,special_application,'
    373             'state,student_id,suspended,container_code\r\n'
    374             ',dp2011_654321,,654321,CERT1,CERT1,CERT1,1981-02-04#,'
     364            'container_code,course1,course2,course_admitted,date_of_birth,'
     365            'display_fullname,email,emp2_end,emp2_position,emp2_reason,'
     366            'emp2_start,emp_end,emp_position,emp_reason,emp_start,employer,'
     367            'employer2,firstname,history,hq_degree,hq_disc,hq_matric_no,'
     368            'hq_school,hq_session,hq_type,jamb_age,jamb_score,jamb_subjects,'
     369            'lastname,lga,locked,middlename,nationality,notice,nysc_lga,'
     370            'nysc_year,password,phone,pp_school,presently_inst,reg_number,'
     371            'result_uploaded,screening_date,screening_score,screening_venue,'
     372            'sex,special,special_application,state,student_id,suspended,'
     373            'translated_state\r\n'
     374            ',dp2011_654321,,654321,dp2011,CERT1,CERT1,CERT1,1981-02-04#,'
    375375            'Anna M. Tester,anna@sample.com,,,,,,,,,,,Anna,'
    376             '[u\'2012-10-28 21:27:52 WAT - Application initialized by system\']'
    377             ',,,,,,,,,,Tester,,0,M.,NG,"Some notice\nin lines.",,,'
    378             'any password,+234-123-12345#,,,123456,,'
    379             '"Saturday, 16th June 2012 2:00:00 PM",98,Exam Room,f,,initialized,,'
    380             '0,dp2011\r\n')
     376            '[u\'2015-06-23 07:31:05 WAT - Application initialized by system\']'
     377            ',,,,,,,,,,Tester,,0,M.,NG,"Some notice in lines.",,,any password,'
     378            '+234-123-12345#,,,123456,,"Saturday, 16th June 2012 2:00:00 PM",'
     379            '98,Exam Room,f,,,initialized,,0,initialized\r\n')
    381380        # We can import the same file if we ignore some columns.
    382381        # Since the applicants_catalog hasn't been notified, the same
     
    385384        result = processor.doImport(
    386385            self.outfile,
    387             ['aggreagate','ignore_applicant_id','application_date',
    388             'ignore_application_number','course1','course2',
    389             'course_admitted','date_of_birth','ignore3','email','emp2_end',
    390             'emp2_position','emp2_reason','emp2_start','emp_end','emp_position',
    391             'emp_reason','emp_start','employer','employer2','firstname','ignore4',
    392             'hq_degree','hq_disc','hq_matric_no','hq_school','hq_session','hq_type',
    393             'jamb_age','jamb_score','jamb_subjects','lastname','lga','locked',
    394             'middlename','nationality','notice','nysc_lga',
    395             'nysc_year','password','phone','pp_school','presently_inst',
    396             'reg_number','result_uploaded',
    397             'screening_date','screening_score','screening_venue','sex',
    398             'special_application',
    399             'state','student_id','suspended','container_code'],
     386            ['aggregate','ignore_applicant_id','application_date','ignore_application_number',
     387            'container_code','course1','course2','course_admitted','date_of_birth',
     388            'ignore_display_fullname','email','emp2_end','emp2_position','emp2_reason',
     389            'emp2_start','emp_end','emp_position','emp_reason','emp_start','employer',
     390            'employer2','firstname','ignore_history','hq_degree','hq_disc','hq_matric_no',
     391            'hq_school','hq_session','hq_type','jamb_age','jamb_score','jamb_subjects',
     392            'lastname','lga','locked','middlename','nationality','notice','nysc_lga',
     393            'nysc_year','password','phone','pp_school','presently_inst','reg_number',
     394            'result_uploaded','screening_date','screening_score','screening_venue',
     395            'sex','ignore_special','special_application','state','student_id','suspended',
     396            'translated_state'],
    400397            mode='create')
    401398        num_succ, num_fail, finished_path, failed_path = result
     
    411408        result = processor.doImport(
    412409            self.outfile,
    413             ['aggregate','ignore_applicant_id','application_date',
    414             'ignore_application_number','course1','course2',
    415             'course_admitted','date_of_birth','ignore3','email','emp2_end',
    416             'emp2_position','emp2_reason','emp2_start','emp_end','emp_position',
    417             'emp_reason','emp_start','employer','employer2','firstname','ignore4',
    418             'hq_degree','hq_disc','hq_matric_no','hq_school','hq_session','hq_type',
    419             'jamb_age','jamb_score','jamb_subjects','lastname','lga','locked',
    420             'middlename','nationality','notice','nysc_lga',
    421             'nysc_year','password','phone','pp_school','presently_inst',
    422             'reg_number','result_uploaded','screening_date','screening_score',
    423             'screening_venue','sex','special_application',
    424             'state','student_id','suspended','ignore_container_code'],
     410            ['aggregate','ignore_applicant_id','application_date','ignore_application_number',
     411            'ignore_container_code','course1','course2','course_admitted','date_of_birth',
     412            'ignore_display_fullname','email','emp2_end','emp2_position','emp2_reason',
     413            'emp2_start','emp_end','emp_position','emp_reason','emp_start','employer',
     414            'employer2','firstname','ignore_history','hq_degree','hq_disc','hq_matric_no',
     415            'hq_school','hq_session','hq_type','jamb_age','jamb_score','jamb_subjects',
     416            'lastname','lga','locked','middlename','nationality','notice','nysc_lga',
     417            'nysc_year','password','phone','pp_school','presently_inst','reg_number',
     418            'result_uploaded','screening_date','screening_score','screening_venue',
     419            'sex','ignore_special','special_application','state','student_id','suspended',
     420            'translated_state'],
    425421            mode='update')
    426422        num_succ, num_fail, finished_path, failed_path = result
Note: See TracChangeset for help on using the changeset viewer.