Ignore:
Timestamp:
5 Nov 2012, 18:03:39 (12 years ago)
Author:
Henrik Bettermann
Message:

Add timestamp to personal data. This timestamp will be checked when students log in. Students sould be remembered to frequently update their personal data.

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

    r9532 r9543  
    24222422        self.assertTrue('An email with' in self.browser.contents)
    24232423
     2424    def test_student_expired_personal_data(self):
     2425        # Login
     2426        delta = timedelta(days=180)
     2427        self.student.personal_updated = datetime.utcnow() - delta
     2428        self.browser.open(self.login_path)
     2429        self.browser.getControl(name="form.login").value = self.student_id
     2430        self.browser.getControl(name="form.password").value = 'spwd'
     2431        self.browser.getControl("Login").click()
     2432        self.assertEqual(self.browser.url, self.student_path)
     2433        self.assertTrue(
     2434            'You logged in' in self.browser.contents)
     2435        self.browser.getLink("Logout").click()
     2436        delta = timedelta(days=181)
     2437        self.student.personal_updated = datetime.utcnow() - delta
     2438        self.browser.open(self.login_path)
     2439        self.browser.getControl(name="form.login").value = self.student_id
     2440        self.browser.getControl(name="form.password").value = 'spwd'
     2441        self.browser.getControl("Login").click()
     2442        self.assertEqual(self.browser.url, self.edit_personal_path)
     2443        self.assertTrue(
     2444            'Your personal data record expired' in self.browser.contents)
     2445
    24242446class StudentRequestPWTests(StudentsFullSetup):
    24252447    # Tests for student registration
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r9486 r9543  
    4545            'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,'
    4646            'firstname,lastname,matric_number,middlename,nationality,officer_comment,'
    47             'perm_address,phone,reg_number,sex,student_id,suspended,password,'
     47            'perm_address,personal_updated,'
     48            'phone,reg_number,sex,student_id,suspended,password,'
    4849            'state,history,certcode,is_postgrad,current_level,current_session\r\n'
    4950
    5051            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
    51             'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",'
     52            'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    5253            '+234-123-12345#,123,f,A111111,0,,created'
    5354            in result
     
    6566            'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,'
    6667            'firstname,lastname,matric_number,middlename,nationality,officer_comment,'
    67             'perm_address,phone,reg_number,sex,student_id,suspended,password,'
     68            'perm_address,personal_updated'
     69            ',phone,reg_number,sex,student_id,suspended,password,'
    6870            'state,history,certcode,is_postgrad,current_level,current_session\r\n'
    6971
    7072            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
    71             'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",'
     73            'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    7274            '+234-123-12345#,123,f,A111111,0,,created'
    7375            in result
     
    8486            'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,'
    8587            'firstname,lastname,matric_number,middlename,nationality,officer_comment,'
    86             'perm_address,phone,reg_number,sex,student_id,suspended,password,'
     88            'perm_address,personal_updated'
     89            ',phone,reg_number,sex,student_id,suspended,password,'
    8790            'state,history,certcode,is_postgrad,current_level,current_session\r\n'
    8891
    8992            'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,'
    90             'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",'
     93            'Anna,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,'
    9194            '+234-123-12345#,123,f,A111111,0,,created'
    9295            in result
Note: See TracChangeset for help on using the changeset viewer.