Changeset 15287 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 9 Jan 2019, 21:17:08 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r15285 r15287 53 53 from waeup.kofa.tests.test_async import FunctionalAsyncTestCase 54 54 from waeup.kofa.browser.tests.test_pdf import samples_dir 55 from waeup.kofa.tests.test_authentication import SECRET 55 56 56 57 PH_LEN = 15911 # Length of placeholder file … … 1521 1522 def init_clearance_officer(self): 1522 1523 # Create clearance officer 1523 self.app['users'].addUser('mrclear', 'mrclearsecret')1524 self.app['users'].addUser('mrclear', SECRET) 1524 1525 self.app['users']['mrclear'].email = 'mrclear@foo.ng' 1525 1526 self.app['users']['mrclear'].title = 'Carlo Pitter' … … 1543 1544 self.browser.open(self.login_path) 1544 1545 self.browser.getControl(name="form.login").value = 'mrclear' 1545 self.browser.getControl(name="form.password").value = 'mrclearsecret'1546 self.browser.getControl(name="form.password").value = SECRET 1546 1547 self.browser.getControl("Login").click() 1547 1548 … … 1702 1703 1703 1704 def test_handle_courses_by_ca(self): 1704 self.app['users'].addUser('mrsadvise', 'mrsadvisesecret')1705 self.app['users'].addUser('mrsadvise', SECRET) 1705 1706 self.app['users']['mrsadvise'].email = 'mradvise@foo.ng' 1706 1707 self.app['users']['mrsadvise'].title = u'Helen Procter' … … 1713 1714 self.browser.open(self.login_path) 1714 1715 self.browser.getControl(name="form.login").value = 'mrsadvise' 1715 self.browser.getControl(name="form.password").value = 'mrsadvisesecret'1716 self.browser.getControl(name="form.password").value = SECRET 1716 1717 self.browser.getControl("Login").click() 1717 1718 self.assertMatches('...You logged in...', self.browser.contents) … … 1851 1852 def test_find_students_in_faculties(self): 1852 1853 # Create local students manager in faculty 1853 self.app['users'].addUser('mrmanager', 'mrmanagersecret')1854 self.app['users'].addUser('mrmanager', SECRET) 1854 1855 self.app['users']['mrmanager'].email = 'mrmanager@foo.ng' 1855 1856 self.app['users']['mrmanager'].title = u'Volk Wagen' … … 1865 1866 self.browser.open(self.login_path) 1866 1867 self.browser.getControl(name="form.login").value = 'mrmanager' 1867 self.browser.getControl(name="form.password").value = 'mrmanagersecret'1868 self.browser.getControl(name="form.password").value = SECRET 1868 1869 self.browser.getControl("Login").click() 1869 1870 self.assertMatches('...You logged in...', self.browser.contents) … … 2021 2022 # StudentImpersonators can login as student 2022 2023 # Create clearance officer 2023 self.app['users'].addUser('mrofficer', 'mrofficersecret')2024 self.app['users'].addUser('mrofficer', SECRET) 2024 2025 self.app['users']['mrofficer'].email = 'mrofficer@foo.ng' 2025 2026 self.app['users']['mrofficer'].title = 'Harry Actor' … … 2030 2031 self.browser.open(self.login_path) 2031 2032 self.browser.getControl(name="form.login").value = 'mrofficer' 2032 self.browser.getControl(name="form.password").value = 'mrofficersecret'2033 self.browser.getControl(name="form.password").value = SECRET 2033 2034 self.browser.getControl("Login").click() 2034 2035 self.assertMatches('...You logged in...', self.browser.contents) … … 2128 2129 'Address line2\n\n') 2129 2130 # Create officer with both roles 2130 self.app['users'].addUser('mrtranscript', 'mrtranscriptsecret')2131 self.app['users'].addUser('mrtranscript', SECRET) 2131 2132 self.app['users']['mrtranscript'].email = 'mrtranscript@foo.ng' 2132 2133 self.app['users']['mrtranscript'].title = 'Ruth Gordon' … … 2138 2139 self.browser.open(self.login_path) 2139 2140 self.browser.getControl(name="form.login").value = 'mrtranscript' 2140 self.browser.getControl(name="form.password").value = 'mrtranscriptsecret'2141 self.browser.getControl(name="form.password").value = SECRET 2141 2142 self.browser.getControl("Login").click() 2142 2143 self.assertMatches('...You logged in...', self.browser.contents) … … 2274 2275 notify(grok.ObjectModifiedEvent(self.student)) 2275 2276 # Create transcript officer 2276 self.app['users'].addUser('mrtranscript', 'mrtranscriptsecret')2277 self.app['users'].addUser('mrtranscript', SECRET) 2277 2278 self.app['users']['mrtranscript'].email = 'mrtranscript@foo.ng' 2278 2279 self.app['users']['mrtranscript'].title = 'Ruth Gordon' … … 2287 2288 self.browser.open(self.login_path) 2288 2289 self.browser.getControl(name="form.login").value = 'mrtranscript' 2289 self.browser.getControl(name="form.password").value = 'mrtranscriptsecret'2290 self.browser.getControl(name="form.password").value = SECRET 2290 2291 self.browser.getControl("Login").click() 2291 2292 self.assertMatches('...You logged in...', self.browser.contents) … … 2315 2316 notify(grok.ObjectModifiedEvent(self.student)) 2316 2317 # Create transcript signee 2317 self.app['users'].addUser('mrtranscript', 'mrtranscriptsecret')2318 self.app['users'].addUser('mrtranscript', SECRET) 2318 2319 self.app['users']['mrtranscript'].email = 'mrtranscript@foo.ng' 2319 2320 self.app['users']['mrtranscript'].title = 'Ruth Gordon' … … 2328 2329 self.browser.open(self.login_path) 2329 2330 self.browser.getControl(name="form.login").value = 'mrtranscript' 2330 self.browser.getControl(name="form.password").value = 'mrtranscriptsecret'2331 self.browser.getControl(name="form.password").value = SECRET 2331 2332 self.browser.getControl("Login").click() 2332 2333 self.assertMatches('...You logged in...', self.browser.contents) … … 4111 4112 def test_export_departmet_officers(self): 4112 4113 # Create department officer 4113 self.app['users'].addUser('mrdepartment', 'mrdepartmentsecret')4114 self.app['users'].addUser('mrdepartment', SECRET) 4114 4115 self.app['users']['mrdepartment'].email = 'mrdepartment@foo.ng' 4115 4116 self.app['users']['mrdepartment'].title = 'Carlo Pitter' … … 4121 4122 self.browser.open(self.login_path) 4122 4123 self.browser.getControl(name="form.login").value = 'mrdepartment' 4123 self.browser.getControl(name="form.password").value = 'mrdepartmentsecret'4124 self.browser.getControl(name="form.password").value = SECRET 4124 4125 self.browser.getControl("Login").click() 4125 4126 self.assertMatches('...You logged in...', self.browser.contents) … … 4145 4146 def test_export_bursary_officers(self): 4146 4147 # Create bursary officer 4147 self.app['users'].addUser('mrbursary', 'mrbursarysecret')4148 self.app['users'].addUser('mrbursary', SECRET) 4148 4149 self.app['users']['mrbursary'].email = 'mrbursary@foo.ng' 4149 4150 self.app['users']['mrbursary'].title = 'Carlo Pitter' … … 4153 4154 self.browser.open(self.login_path) 4154 4155 self.browser.getControl(name="form.login").value = 'mrbursary' 4155 self.browser.getControl(name="form.password").value = 'mrbursarysecret'4156 self.browser.getControl(name="form.password").value = SECRET 4156 4157 self.browser.getControl("Login").click() 4157 4158 self.assertMatches('...You logged in...', self.browser.contents) … … 4183 4184 def test_export_accommodation_officers(self): 4184 4185 # Create bursary officer 4185 self.app['users'].addUser('mracco', 'mraccosecret')4186 self.app['users'].addUser('mracco', SECRET) 4186 4187 self.app['users']['mracco'].email = 'mracco@foo.ng' 4187 4188 self.app['users']['mracco'].title = 'Carlo Pitter' … … 4191 4192 self.browser.open(self.login_path) 4192 4193 self.browser.getControl(name="form.login").value = 'mracco' 4193 self.browser.getControl(name="form.password").value = 'mraccosecret'4194 self.browser.getControl(name="form.password").value = SECRET 4194 4195 self.browser.getControl("Login").click() 4195 4196 self.assertMatches('...You logged in...', self.browser.contents) … … 4234 4235 4235 4236 def login_as_lecturer(self): 4236 self.app['users'].addUser('mrslecturer', 'mrslecturersecret')4237 self.app['users'].addUser('mrslecturer', SECRET) 4237 4238 self.app['users']['mrslecturer'].email = 'mrslecturer@foo.ng' 4238 4239 self.app['users']['mrslecturer'].title = u'Mercedes Benz' … … 4253 4254 self.browser.getControl(name="form.login").value = 'mrslecturer' 4254 4255 self.browser.getControl( 4255 name="form.password").value = 'mrslecturersecret'4256 name="form.password").value = SECRET 4256 4257 self.browser.getControl("Login").click() 4257 4258 # Store reused urls/paths
Note: See TracChangeset for help on using the changeset viewer.