- Timestamp:
- 19 Aug 2016, 06:53:34 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py
r13979 r14093 365 365 self.browser.getControl(name="form.course1").value = ['CERT1'] 366 366 self.browser.getControl("Save").click() 367 #self.assertMatches('...Not exactly 4 items selected...', self.browser.contents)368 # Since the testbrowser does not support Javascrip we can't test the369 # save action which clears jamb_subjects_list on the edit form page370 # An error would be raised.371 372 # If we login as manager, we can use the manage form page.373 self.browser.open(self.logout_path)374 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')375 self.cbtapplicant.jamb_subjects_list = [376 'english_language', 'fine_art', 'mathematics', 'physics']377 self.browser.open(self.cbtapplicant_path + '/manage')378 self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'379 self.browser.getControl(name="form.lga").value = ['foreigner']380 self.browser.getControl(name="form.nationality").value = ['NG']381 self.browser.getControl(name="form.sex").value = ['m']382 self.browser.getControl(name="form.email").value = 'xx@yy.zz'383 self.browser.getControl(name="form.course1").value = ['CERT1']384 self.browser.getControl(name="form.reg_number").value = '1234'385 self.browser.getControl("Save").click()386 367 self.assertMatches('...Form has been saved...', self.browser.contents) 387 # The save action on this form pages, if called with the testbrowser,388 # replaces jamb_subjects_list by an empty list (and not by None).389 self.assertEqual(self.cbtapplicant.jamb_subjects_list, [])390 368 391 369 class ApplicantExporterTest(ApplicantImportExportSetup): … … 432 410 result = open(self.outfile, 'rb').read() 433 411 self.assertMatches(result, 434 'aggregate,applicant_id, course1,course2,course_admitted,'435 ' date_of_birth,email,emp2_end,emp2_position,emp2_reason,'436 'emp2_ start,emp_end,emp_position,emp_reason,emp_start,employer,'437 'emp loyer2,firstname,fst_sit_date,fst_sit_fname,fst_sit_no,'438 'f st_sit_results,fst_sit_type,hq_degree,hq_disc,hq_fname,'439 ' hq_matric_no,hq_school,hq_session,hq_type,jamb_reg_number,'440 ' jamb_score,jamb_subjects,jamb_subjects_list,lastname,lga,'441 ' locked,middlename,nationality,notice,nysc_lga,nysc_year,'442 ' phone,presently_inst,programme_type,reg_number,result_uploaded,'443 ' scd_sit_date,scd_sit_fname,scd_sit_no,scd_sit_results,'444 ' scd_sit_type,screening_date,screening_score,screening_venue,'445 's ex,special_application,student_id,suspended,password,state,'446 ' history,container_code,application_number,display_fullname,'447 ' application_date\r\n'448 449 ',dp2011_654321,CERT1,CERT1,CERT1,1981-02-04#,' 450 ' anna@sample.com,,,,,,,,,,,Anna,,,,,,,,,,,,,,,'451 ' Line 1++Line 2,"[\'english_language\', \'fine_art\']",'452 ' Tester,,0,M.,NG,"Some notice\nin lines.",,,'453 ' +234-123-12345#,,,123456,,,,,,,'454 ' "Saturday, 16th June 2012 2:00:00 PM",98,Exam Room,f,,,'455 ' 0,any password,initialized,'456 '[u\'2016-0 6-23 10:58:23WAT - Application initialized by system\'],'412 'aggregate,applicant_id,bank_account_name,bank_account_number,' 413 'bank_name,course1,course2,course_admitted,date_of_birth,email,' 414 'emp2_end,emp2_position,emp2_reason,emp2_start,emp_end,' 415 'emp_position,emp_reason,emp_start,employer,employer2,' 416 'firstname,fst_sit_date,fst_sit_fname,fst_sit_no,' 417 'fst_sit_results,fst_sit_type,hq_degree,hq_disc,' 418 'hq_fname,hq_matric_no,hq_school,hq_session,hq_type,' 419 'jamb_reg_number,jamb_score,jamb_subjects,jamb_subjects_list,' 420 'lastname,lga,locked,middlename,nationality,notice,nysc_lga,' 421 'nysc_year,phone,presently_inst,programme_type,reg_number,' 422 'result_uploaded,scd_sit_date,scd_sit_fname,scd_sit_no,' 423 'scd_sit_results,scd_sit_type,screening_date,screening_score,' 424 'screening_venue,sex,special_application,student_id,' 425 'suspended,password,state,history,container_code,' 426 'application_number,display_fullname,application_date\r\n' 427 428 ',dp2011_654321,,,,CERT1,CERT1,CERT1,1981-02-04#,' 429 'anna@sample.com,,,,,,,,,,,Anna,,,,,,,,,,,,,,,Line 1++Line 2,' 430 '"[\'english_language\', \'fine_art\']",' 431 'Tester,,0,M.,NG,"Some notice\nin lines.",,,+234-123-12345#,,,' 432 '123456,,,,,,,"Saturday, 16th June 2012 2:00:00 PM",98,' 433 'Exam Room,f,,,0,any password,initialized,' 434 '[u\'2016-08-19 07:30:05 WAT - Application initialized by system\'],' 457 435 'dp2011,654321,Anna M. Tester,\r\n') 458 436 # We can import the same file if we ignore some columns. … … 463 441 self.outfile, 464 442 [ 465 'aggregate','ignore_applicant_id','course1','course2','course_admitted', 466 'date_of_birth','email','emp2_end','emp2_position','emp2_reason', 467 'emp2_start','emp_end','emp_position','emp_reason','emp_start','employer', 468 'employer2','firstname','fst_sit_date','fst_sit_fname','fst_sit_no', 469 'fst_sit_results','fst_sit_type','hq_degree','hq_disc','hq_fname', 470 'hq_matric_no','hq_school','hq_session','hq_type','jamb_reg_number', 471 'jamb_score','jamb_subjects','jamb_subjects_list','lastname','lga', 472 'locked','middlename','nationality','notice','nysc_lga','nysc_year', 473 'phone','presently_inst','programme_type','reg_number','result_uploaded', 474 'scd_sit_date','scd_sit_fname','scd_sit_no','scd_sit_results', 475 'scd_sit_type','screening_date','screening_score','screening_venue', 476 'sex','special_application','student_id','suspended','password','state', 477 'ignore_history','container_code','ignore_application_number','display_fullname', 478 'application_date' 443 'aggregate','ignore_applicant_id','bank_account_name','bank_account_number', 444 'bank_name','course1','course2','course_admitted','date_of_birth','email', 445 'emp2_end','emp2_position','emp2_reason','emp2_start','emp_end', 446 'emp_position','emp_reason','emp_start','employer','employer2', 447 'firstname','fst_sit_date','fst_sit_fname','fst_sit_no', 448 'fst_sit_results','fst_sit_type','hq_degree','hq_disc', 449 'hq_fname','hq_matric_no','hq_school','hq_session','hq_type', 450 'jamb_reg_number','jamb_score','jamb_subjects','jamb_subjects_list', 451 'lastname','lga','locked','middlename','nationality','notice','nysc_lga', 452 'nysc_year','phone','presently_inst','programme_type','reg_number', 453 'result_uploaded','scd_sit_date','scd_sit_fname','scd_sit_no', 454 'scd_sit_results','scd_sit_type','screening_date','screening_score', 455 'screening_venue','sex','special_application','student_id', 456 'suspended','password','state','history','container_code', 457 'application_number','display_fullname','application_date' 479 458 ], 480 459 mode='create') … … 492 471 self.outfile, 493 472 [ 494 'aggregate','ignore_applicant_id','course1','course2','course_admitted', 495 'date_of_birth','email','emp2_end','emp2_position','emp2_reason', 496 'emp2_start','emp_end','emp_position','emp_reason','emp_start','employer', 497 'employer2','firstname','fst_sit_date','fst_sit_fname','fst_sit_no', 498 'fst_sit_results','fst_sit_type','hq_degree','hq_disc','hq_fname', 499 'hq_matric_no','hq_school','hq_session','hq_type','jamb_reg_number', 500 'jamb_score','jamb_subjects','jamb_subjects_list','lastname','lga', 501 'locked','middlename','nationality','notice','nysc_lga','nysc_year', 502 'phone','presently_inst','programme_type','reg_number','result_uploaded', 503 'scd_sit_date','scd_sit_fname','scd_sit_no','scd_sit_results', 504 'scd_sit_type','screening_date','screening_score','screening_venue', 505 'sex','special_application','student_id','suspended','password','state', 506 'ignore_history','ignore_container_code','ignore_application_number', 507 'display_fullname','application_date' 473 'aggregate','ignore_applicant_id','bank_account_name','bank_account_number', 474 'bank_name','course1','course2','course_admitted','date_of_birth','email', 475 'emp2_end','emp2_position','emp2_reason','emp2_start','emp_end', 476 'emp_position','emp_reason','emp_start','employer','employer2', 477 'firstname','fst_sit_date','fst_sit_fname','fst_sit_no', 478 'fst_sit_results','fst_sit_type','hq_degree','hq_disc', 479 'hq_fname','hq_matric_no','hq_school','hq_session','hq_type', 480 'jamb_reg_number','jamb_score','jamb_subjects','jamb_subjects_list', 481 'lastname','lga','locked','middlename','nationality','notice','nysc_lga', 482 'nysc_year','phone','presently_inst','programme_type','reg_number', 483 'result_uploaded','scd_sit_date','scd_sit_fname','scd_sit_no', 484 'scd_sit_results','scd_sit_type','screening_date','screening_score', 485 'screening_venue','sex','special_application','student_id', 486 'suspended','password','state','ignore_history','ignore_container_code', 487 'ignore_application_number','display_fullname','application_date' 508 488 ], 509 489 mode='update')
Note: See TracChangeset for help on using the changeset viewer.