Changeset 13976 for main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
- Timestamp:
- 23 Jun 2016, 05:08:41 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r13968 r13976 1519 1519 '- discarded: job_id=%s' % job_ids[1] in logcontent 1520 1520 ) 1521 1522 class ApplicantRefereeReportTests(ApplicantsFullSetup, FunctionalAsyncTestCase): 1523 # Tests for ApplicantRefereeReport class views and pages 1524 1525 layer = FunctionalLayer 1526 1527 def test_add_and_view_reports(self): 1528 # Managers can view reports 1529 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1530 self.browser.open(self.manage_path) 1531 # So far no report has been added 1532 self.assertFalse('Referee' in self.browser.contents) 1533 # XXX: Form will be public 1534 self.browser.open(self.view_path + '/addrefereereport') 1535 self.browser.getControl(name="form.name").value = 'John Trust' 1536 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 1537 self.browser.getControl("Submit").click() 1538 self.assertTrue('Referee report created' in self.browser.contents) 1539 # Report has been created and we are viewing the report's index page 1540 self.assertEqual(len(self.applicant.refereereports), 1) 1541 report = self.applicant.refereereports[0] 1542 self.assertEqual( 1543 self.browser.url, self.view_path + '/%s/index' % report.r_id) 1544 # Report creation is logged 1545 logfile = os.path.join( 1546 self.app['datacenter'].storage, 'logs', 'applicants.log') 1547 logcontent = open(logfile).read() 1548 self.assertTrue( 1549 'zope.mgr - applicants.browser.RefereeReportAddFormPage - ' 1550 '%s - added: %s\n' % (self.applicant.applicant_id, report.r_id) 1551 in logcontent 1552 )
Note: See TracChangeset for help on using the changeset viewer.