Ignore:
Timestamp:
28 Mar 2012, 06:23:25 (13 years ago)
Author:
Henrik Bettermann
Message:

Adapt changes recently made in the base package.

Location:
main/waeup.custom/trunk/src/waeup/custom/students/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.custom/trunk/src/waeup/custom/students/tests/sample_student_data.csv

    r7894 r7995  
    1 firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,lga,nationality
    2 Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234
    3 Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234
    4 Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234
     1firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex
     2Aaren,Pieri,1,,100000,aa@aa.ng,1234,m
     3Aaren,Finau,2,,100001,aa@aa.ng,1234,m
     4Aaren,Berson,3,,100002,aa@aa.ng,1234,m
  • main/waeup.custom/trunk/src/waeup/custom/students/tests/test_browser.py

    r7934 r7995  
    7272
    7373    def test_import(self):
    74         # We added empty columns 'nationality' and 'lga' to the import file.
    75         # The original processor will fail because these fields are required
     74        # We have an empty column 'date_of_birth' in the import file.
     75        # The original processor will fail because 'date_of_birth' is required
    7676        # in the base package.
    7777        num, num_warns, fin_file, fail_file = self.processor_base.doImport(
     
    7979        self.assertEqual(num_warns,3)
    8080        assert len(self.app['students'].keys()) == 0
    81         # The customized processor does not complain since both fields are
     81        # The customized processor does not complain since 'date_of_birth' is
    8282        # not required in the custom package.
    8383        num, num_warns, fin_file, fail_file = self.processor.doImport(
    8484            self.csv_file, STUDENT_HEADER_FIELDS)
     85        #print open(fail_file).read()
    8586        self.assertEqual(num_warns,0)
    8687        assert len(self.app['students'].keys()) == 3
     
    103104        # Managers can add online payment tickets
    104105        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    105         self.browser.open(self.payments_student_path)
     106        self.browser.open(self.payments_path)
    106107        self.browser.getControl("Add online payment ticket").click()
    107108        self.browser.getControl("Create ticket").click()
     
    109110                           self.browser.contents)
    110111        IWorkflowState(self.student).setState('cleared')
    111         self.browser.open(self.payments_student_path + '/addop')
     112        self.browser.open(self.payments_path + '/addop')
    112113        self.browser.getControl("Create ticket").click()
    113114        self.assertMatches('...ticket created...',
     
    122123        ticket.p_state = 'paid'
    123124        IWorkflowState(self.student).setState('returning')
    124         self.browser.open(self.payments_student_path + '/addop')
     125        self.browser.open(self.payments_path + '/addop')
    125126        self.browser.getControl("Create ticket").click()
    126127        self.assertMatches('...This type of payment has already been made...',
     
    130131        for payment in keys:
    131132            del self.student['payments'][payment]
    132         self.browser.open(self.payments_student_path + '/addop')
     133        self.browser.open(self.payments_path + '/addop')
    133134        self.browser.getControl("Create ticket").click()
    134135        self.assertMatches('...ticket created...',
    135136                           self.browser.contents)
    136         self.browser.open(self.payments_student_path + '/addop')
     137        self.browser.open(self.payments_path + '/addop')
    137138        self.browser.getControl(name="form.p_category").value = ['gown']
    138139        self.browser.getControl("Create ticket").click()
    139         self.browser.open(self.payments_student_path + '/addop')
     140        self.browser.open(self.payments_path + '/addop')
    140141        self.browser.getControl(name="form.p_category").value = ['transfer']
    141142        self.browser.getControl("Create ticket").click()
    142         self.browser.open(self.payments_student_path + '/addop')
     143        self.browser.open(self.payments_path + '/addop')
    143144        self.browser.getControl(
    144145            name="form.p_category").value = ['bed_allocation']
    145146        self.browser.getControl("Create ticket").click()
    146         self.browser.open(self.payments_student_path + '/addop')
     147        self.browser.open(self.payments_path + '/addop')
    147148        self.browser.getControl(
    148149            name="form.p_category").value = ['hostel_maintenance']
    149150        self.browser.getControl("Create ticket").click()
    150         self.browser.open(self.payments_student_path + '/addop')
     151        self.browser.open(self.payments_path + '/addop')
    151152        self.browser.getControl(name="form.p_category").value = ['clearance']
    152153        self.browser.getControl("Create ticket").click()
    153154        self.certificate.study_mode = 'ug_pt'
    154         self.browser.open(self.payments_student_path + '/addop')
     155        self.browser.open(self.payments_path + '/addop')
    155156        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    156157        self.browser.getControl("Create ticket").click()
     
    161162        # be shown
    162163        del self.app['configuration']['2004']
    163         self.browser.open(self.payments_student_path)
     164        self.browser.open(self.payments_path)
    164165        self.browser.getControl("Add online payment ticket").click()
    165166        self.browser.getControl("Create ticket").click()
    166167        self.assertMatches('...Session configuration object is not...',
    167168                           self.browser.contents)
    168 
    169 
Note: See TracChangeset for help on using the changeset viewer.