Changeset 16234 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 11 Sep 2020, 11:47:23 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r16213 r16234 52 52 from waeup.kofa.authentication import LocalRoleSetEvent 53 53 from waeup.kofa.hostels.hostel import Hostel, Bed, NOT_OCCUPIED 54 from waeup.kofa.applicants.container import ApplicantsContainer 54 55 from waeup.kofa.tests.test_async import FunctionalAsyncTestCase 55 56 from waeup.kofa.browser.tests.test_pdf import samples_dir … … 2398 2399 self.assertEqual(self.student['studycourse'].transcript_signees, None) 2399 2400 2401 def createTranscriptApplications(self): 2402 # We create transcript application containers tscs1 and tscf2019 2403 applicantscontainer1 = ApplicantsContainer() 2404 applicantscontainer1.code = u'tscs1' 2405 applicantscontainer1.prefix = u'app' 2406 applicantscontainer1.year = 2020 2407 applicantscontainer1.title = u'This is the TSC container' 2408 applicantscontainer1.application_category = 'no' 2409 applicantscontainer1.mode = 'create' 2410 self.app['applicants']['tscs1'] = applicantscontainer1 2411 applicantscontainer2 = ApplicantsContainer() 2412 applicantscontainer2.code = u'tscf2020' 2413 applicantscontainer2.prefix = u'app' 2414 applicantscontainer2.year = 2020 2415 applicantscontainer2.title = u'This is the TSC container' 2416 applicantscontainer2.application_category = 'no' 2417 applicantscontainer2.mode = 'create' 2418 self.app['applicants']['tscf2020'] = applicantscontainer2 2419 # Add applicants 2420 self.applicant1 = createObject('waeup.Applicant') 2421 self.applicant1.firstname = u'Joanne' 2422 self.applicant1.lastname = u'Abba' 2423 self.applicant1.course_studied = self.certificate 2424 IWorkflowState(self.applicant1).setState('submitted') 2425 self.app['applicants']['tscs1'].addApplicant(self.applicant1) 2426 self.applicant2 = createObject('waeup.Applicant') 2427 self.applicant2.firstname = u'Josef' 2428 self.applicant2.lastname = u'Abba' 2429 self.applicant2.course_studied = self.certificate 2430 IWorkflowState(self.applicant2).setState('submitted') 2431 self.app['applicants']['tscf2020'].addApplicant(self.applicant2) 2432 2400 2433 def test_landingpage_transcript_officer(self): 2401 2434 IWorkflowState(self.student).setState('transcript requested') … … 2412 2445 notify(LocalRoleSetEvent( 2413 2446 fac, 'waeup.local.TranscriptOfficer', 'mrtranscript', granted=True)) 2447 self.createTranscriptApplications() 2414 2448 # Login as transcript officer 2415 2449 self.browser.open(self.login_path) … … 2418 2452 self.browser.getControl("Login").click() 2419 2453 self.assertMatches('...You logged in...', self.browser.contents) 2454 # Officers do see the transcript applicants 2455 self.assertTrue( 2456 '<td>Josef Abba</td>' in self.browser.contents) 2457 self.assertTrue( 2458 '<td>Joanne Abba</td>' in self.browser.contents) 2420 2459 # Officer is on landing page and does see the transcript link 2421 2460 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.