Changeset 14992 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 26 Apr 2018, 08:50:56 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r14896 r14992 3980 3980 self.student['studycourse'].addStudentStudyLevel( 3981 3981 self.certificate, studylevel) 3982 # Assign local Lecturer role for a c ertificate.3982 # Assign local Lecturer role for a course. 3983 3983 course = self.app['faculties']['fac1']['dep1'].courses['COURSE1'] 3984 3984 prmlocal = IPrincipalRoleManager(course) … … 4011 4011 self.assertMatches('...You logged in...', self.browser.contents) 4012 4012 self.assertEqual(self.browser.url, URL_LECTURER_LANDING) 4013 self.assertTrue( 4014 "<span>Unnamed Course (COURSE1)</span>" 4015 in self.browser.contents) 4016 4017 def test_lecturer_department_role(self): 4018 # lecturers can login and will be led to landing page also if 4019 # role is assigned at department level. 4020 self.login_as_lecturer() 4021 # we remove the role granted above 4022 course = self.app['faculties']['fac1']['dep1'].courses['COURSE1'] 4023 prmlocal = IPrincipalRoleManager(course) 4024 prmlocal.removeRoleFromPrincipal('waeup.local.Lecturer', 'mrslecturer') 4025 notify(LocalRoleSetEvent( 4026 course, 'waeup.local.Lecturer', 'mrslecturer', granted=False)) 4027 self.browser.open(URL_LECTURER_LANDING) 4028 # no course appears 4029 self.assertFalse( 4030 "<span>Unnamed Course (COURSE1)</span>" 4031 in self.browser.contents) 4032 # we assign lecturer at department level 4033 dep = self.app['faculties']['fac1']['dep1'] 4034 prmlocal = IPrincipalRoleManager(dep) 4035 prmlocal.assignRoleToPrincipal('waeup.local.Lecturer', 'mrslecturer') 4036 notify(LocalRoleSetEvent( 4037 dep, 'waeup.local.Lecturer', 'mrslecturer', granted=True)) 4038 self.browser.open(URL_LECTURER_LANDING) 4039 # course appears again 4040 self.assertTrue( 4041 "<span>Unnamed Course (COURSE1)</span>" 4042 in self.browser.contents) 4013 4043 4014 4044 def test_my_roles_link_works(self):
Note: See TracChangeset for help on using the changeset viewer.