Ignore:
Timestamp:
28 Oct 2012, 20:32:23 (12 years ago)
Author:
Henrik Bettermann
Message:

Add some lgas.py
Fix test.

File:
1 edited

Legend:

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

    r9179 r9449  
    311311        applicant.lastname = u'Tester'
    312312        applicant.middlename = u'M.'
     313        applicant.nationality = u'NG'
    313314        applicant.date_of_birth = datetime.date(1981, 2, 4)
    314315        applicant.sex = 'f'
     
    332333        exporter.export_all(self.app, self.outfile)
    333334        result = open(self.outfile, 'rb').read()
    334         # The exported records do contain a real date in their
    335         # history dict. We skip the date and split the comparison
    336         # into two parts.
    337         self.assertTrue(
    338             'aggregate,applicant_id,application_date,application_number,course1,course2,'
    339             'course_admitted,date_of_birth,display_fullname,email,emp2_end,'
    340             'emp2_position,emp2_reason,emp2_start,emp_end,emp_position,'
    341             'emp_reason,emp_start,employer,employer2,firstname,history,'
    342             'hq_degree,hq_disc,hq_matric_no,hq_school,hq_session,hq_type,'
    343             'jamb_score,jamb_subjects,lastname,lga,locked,middlename,'
    344             'nationality,notice,nysc_lga,'
    345             'nysc_year,password,phone,pp_school,presently_inst,'
    346             'reg_number,result_uploaded,screening_date,screening_score,screening_venue,sex,'
    347             'state,student_id,'
    348             'suspended,container_code'
    349             in result)
    350         self.assertTrue(
    351             'Application initialized by system\'],,,,,,,,,Tester,,0,M.,,'
    352             '"Some notice\nin lines.",,,any password,+234-123-12345#,,,'
    353             '123456,,"Saturday, 16th June 2012 2:00:00 PM",98,Exam Room,f,'
    354             'initialized,,0,dp2011'
    355             in result)
     335        self.assertMatches(result,
     336            'aggregate,applicant_id,application_date,application_number,'
     337            'course1,course2,course_admitted,date_of_birth,display_fullname,'
     338            'email,emp2_end,emp2_position,emp2_reason,emp2_start,emp_end,'
     339            'emp_position,emp_reason,emp_start,employer,employer2,'
     340            'firstname,history,hq_degree,hq_disc,hq_matric_no,hq_school,'
     341            'hq_session,hq_type,jamb_score,jamb_subjects,lastname,lga,'
     342            'locked,middlename,nationality,notice,nysc_lga,nysc_year,'
     343            'password,phone,pp_school,presently_inst,reg_number,'
     344            'result_uploaded,screening_date,screening_score,'
     345            'screening_venue,sex,state,student_id,suspended,container_code\r\n'
     346            ',dp2011_654321,,654321,CERT1,CERT1,CERT1,1981-02-04#,'
     347            'Anna M. Tester,anna@sample.com,,,,,,,,,,,Anna,'
     348            '[u\'2012-10-28 21:27:52 WAT - Application initialized by system\']'
     349            ',,,,,,,,,Tester,,0,M.,NG,"Some notice\nin lines.",,,'
     350            'any password,+234-123-12345#,,,123456,,'
     351            '"Saturday, 16th June 2012 2:00:00 PM",98,Exam Room,f,initialized,,'
     352            '0,dp2011\r\n')
    356353        # We can import the same file if we ignore some columns.
    357354        # Since the applicants_catalog hasn't been notified, the same
     
    374371            mode='create')
    375372        num_succ, num_fail, finished_path, failed_path = result
     373        #content = open(failed_path).read()
    376374        self.assertEqual(num_succ,1)
    377375        self.assertEqual(num_fail,0)
Note: See TracChangeset for help on using the changeset viewer.