Ignore:
Timestamp:
26 Sep 2019, 11:38:36 (5 years ago)
Author:
Henrik Bettermann
Message:

Finalize parents access.

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

    r15606 r15609  
    37833783            'adm_code,clr_code,date_of_birth,email,employer,'
    37843784            'firstname,flash_notice,lastname,matric_number,middlename,nationality,'
    3785             'officer_comment,perm_address,personal_updated,phone,reg_number,'
     3785            'officer_comment,parents_email,perm_address,'
     3786            'personal_updated,phone,reg_number,'
    37863787            'sex,student_id,suspended,suspended_comment,'
    37873788            'password,state,history,certcode,is_postgrad,'
    37883789            'current_level,current_session\r\n'
    3789             ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,'
     3790            ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,,'
    37903791            '1234#,123,m,K1000000,0,,{SSHA}' in self.browser.contents)
    37913792        self.browser.open('http://localhost/app/datacenter/@@export')
     
    39113912            'adm_code,clr_code,date_of_birth,email,employer,'
    39123913            'firstname,flash_notice,lastname,matric_number,middlename,nationality,'
    3913             'officer_comment,perm_address,personal_updated,phone,reg_number,'
     3914            'officer_comment,parents_email,perm_address,'
     3915            'personal_updated,phone,reg_number,'
    39143916            'sex,student_id,suspended,suspended_comment,'
    39153917            'password,state,history,certcode,is_postgrad,'
    39163918            'current_level,current_session\r\n'
    3917             ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,'
     3919            ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,,'
    39183920            '1234#,123,m,K1000000,0,,{SSHA}' in self.browser.contents)
    39193921        self.assertEqual(len(self.app['datacenter'].running_exports), 1)
     
    46754677    # Tests for UI actions when acting as parents.
    46764678
     4679    def test_request_ppw(self):
     4680        self.app['students'][self.student_id].parents_email = 'par@yy.zz'
     4681        self.browser.open('http://localhost/app/requestppw')
     4682        self.browser.getControl(name="form.lastname").value = 'tESTer'
     4683        self.browser.getControl(name="form.number").value = '123'
     4684        self.browser.getControl(name="form.email").value = 'par@yy.zz'
     4685        self.browser.getControl("Send temporary login credentials").click()
     4686        self.assertTrue('Your password request was successful.'
     4687            in self.browser.contents)
     4688        logfile = os.path.join(
     4689            self.app['datacenter'].storage, 'logs', 'main.log')
     4690        logcontent = open(logfile).read()
     4691        self.assertTrue('zope.anybody - students.browser.RequestParentsPasswordPage - '
     4692                        '123 (K1000000) - par@yy.zz' in logcontent)
     4693        return
     4694
    46774695    def test_login_as_parents(self):
    4678         # Sstudent login still works after all the changes made
     4696        # Student login still works after all the changes made
    46794697        self.browser.open(self.login_path)
    46804698        self.browser.getControl(name="form.login").value = self.student_id
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r15546 r15609  
    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        )
     
    158158            'adm_code,clr_code,date_of_birth,email,'
    159159            'employer,firstname,flash_notice,lastname,matric_number,middlename,'
    160             'nationality,officer_comment,perm_address,personal_updated,'
     160            'nationality,officer_comment,parents_email,'
     161            'perm_address,personal_updated,'
    161162            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    162163            'password,state,history,'
    163164            'certcode,is_postgrad,current_level,current_session\r\n'
    164165            'my adm code,my clr code,'
    165             '1981-02-04#,anna@sample.com,,Anna,,Tester,234,M.,NG,,'
     166            '1981-02-04#,anna@sample.com,,Anna,,Tester,234,M.,NG,,,'
    166167            '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,f,'
    167168            'A111111,0,,,created'
     
    180181            'adm_code,clr_code,date_of_birth,email,'
    181182            'employer,firstname,flash_notice,lastname,matric_number,middlename,'
    182             'nationality,officer_comment,perm_address,personal_updated,'
     183            'nationality,officer_comment,parents_email,'
     184            'perm_address,personal_updated,'
    183185            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    184186            'password,state,history,certcode,'
    185187            'is_postgrad,current_level,current_session\r\n'
    186188            'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    187             'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
     189            'Anna,,Tester,234,M.,NG,,,"Studentroad 21\nLagos 123456\n"'
    188190            ',,+234-123-12345#,123,f,A111111,0,,,created'
    189191            in result
     
    200202            'adm_code,clr_code,date_of_birth,email,'
    201203            'employer,firstname,flash_notice,lastname,matric_number,middlename,'
    202             'nationality,officer_comment,perm_address,personal_updated,'
     204            'nationality,officer_comment,parents_email,'
     205            'perm_address,personal_updated,'
    203206            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
    204207            'password,state,history,certcode,'
    205208            'is_postgrad,current_level,current_session\r\n'
    206209            'my adm code,my clr code,1981-02-04#,anna@sample.com,,'
    207             'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"'
     210            'Anna,,Tester,234,M.,NG,,,"Studentroad 21\nLagos 123456\n"'
    208211            ',,+234-123-12345#,123,f,A111111,0,,,created'
    209212            in result
Note: See TracChangeset for help on using the changeset viewer.