Ignore:
Timestamp:
18 Feb 2016, 11:52:18 (9 years ago)
Author:
Henrik Bettermann
Message:

Add flash_notice field.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r13700 r13711  
    544544        # Only the Application Slip does not exist
    545545        self.assertFalse('Application Slip' in self.browser.contents)
     546        return
     547
     548    def test_flash_notice(self):
     549        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     550        self.browser.open(self.student_path)
     551        self.assertFalse('alert alert-warning' in self.browser.contents)
     552        self.student.flash_notice = u'Happy Birthday!'
     553        self.browser.open(self.student_path)
     554        self.assertTrue(
     555            '<div><div class="alert alert-warning">Happy Birthday!</div>'
     556            in self.browser.contents)
    546557        return
    547558
     
    35223533        self.assertTrue(
    35233534            'adm_code,clr_code,date_of_birth,email,employer,'
    3524             'firstname,lastname,matric_number,middlename,nationality,'
     3535            'firstname,flash_notice,lastname,matric_number,middlename,nationality,'
    35253536            'officer_comment,perm_address,personal_updated,phone,reg_number,'
    35263537            'sex,student_id,suspended,suspended_comment,transcript_comment,'
    35273538            'password,state,history,certcode,is_postgrad,current_level,'
    35283539            'current_session\r\n'
    3529             ',,1981-02-04#,aa@aa.ng,,Anna,Tester,234,,,,,,'
     3540            ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,'
    35303541            '1234#,123,m,K1000000,0,,,{SSHA}' in self.browser.contents)
    35313542
     
    36223633        self.assertTrue(
    36233634            'adm_code,clr_code,date_of_birth,email,employer,'
    3624             'firstname,lastname,matric_number,middlename,nationality,'
     3635            'firstname,flash_notice,lastname,matric_number,middlename,nationality,'
    36253636            'officer_comment,perm_address,personal_updated,phone,reg_number,'
    36263637            'sex,student_id,suspended,suspended_comment,transcript_comment,'
    36273638            'password,state,history,certcode,is_postgrad,current_level,'
    36283639            'current_session\r\n'
    3629             ',,1981-02-04#,aa@aa.ng,,Anna,Tester,234,,,,,,'
     3640            ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,'
    36303641            '1234#,123,m,K1000000,0,,,{SSHA}' in self.browser.contents)
    36313642        self.assertEqual(len(self.app['datacenter'].running_exports), 1)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r13641 r13711  
    126126    std_csv_entry = (
    127127        'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    128         'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
     128        'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    129129        '+234-123-12345#,123,f,A111111,0,,,,created'
    130130        )
     
    157157        self.assertTrue(
    158158            'adm_code,clr_code,date_of_birth,email,'
    159             'employer,firstname,lastname,matric_number,middlename,'
     159            'employer,firstname,flash_notice,lastname,matric_number,middlename,'
    160160            'nationality,officer_comment,perm_address,personal_updated,'
    161161            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
     
    163163            'current_level,current_session\r\n'
    164164            'my adm code,my clr code,'
    165             '1981-02-04#,anna@sample.com,,Anna,Tester,234,M.,NG,,'
     165            '1981-02-04#,anna@sample.com,,Anna,,Tester,234,M.,NG,,'
    166166            '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,f,'
    167167            'A111111,0,,,,created'
     
    179179        self.assertTrue(
    180180            'adm_code,clr_code,date_of_birth,email,'
    181             'employer,firstname,lastname,matric_number,middlename,'
     181            'employer,firstname,flash_notice,lastname,matric_number,middlename,'
    182182            'nationality,officer_comment,perm_address,personal_updated,'
    183183            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
     
    185185            'is_postgrad,current_level,current_session\r\n'
    186186            'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    187             'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
     187            'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
    188188            ',,+234-123-12345#,123,f,A111111,0,,,,created'
    189189            in result
     
    199199        self.assertTrue(
    200200            'adm_code,clr_code,date_of_birth,email,'
    201             'employer,firstname,lastname,matric_number,middlename,'
     201            'employer,firstname,flash_notice,lastname,matric_number,middlename,'
    202202            'nationality,officer_comment,perm_address,personal_updated,'
    203203            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
     
    205205            'is_postgrad,current_level,current_session\r\n'
    206206            'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    207             'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
     207            'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
    208208            ',,+234-123-12345#,123,f,A111111,0,,,,created'
    209209            in result
Note: See TracChangeset for help on using the changeset viewer.