Changeset 16243 for main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
- Timestamp:
- 23 Sep 2020, 19:42:07 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r16231 r16243 25 25 import grok 26 26 import logging 27 from datetime import datetime28 27 from StringIO import StringIO 29 28 from datetime import datetime, date, timedelta … … 1805 1804 return 1806 1805 1807 def test_add_and_view_ reports(self):1806 def test_add_and_view_manage_reports(self): 1808 1807 mandate = RefereeReportMandate() 1809 1808 mandate.params['name'] = u'John Referee' … … 1844 1843 self.assertEqual(len(self.applicant.refereereports), 1) 1845 1844 report = self.applicant.refereereports[0] 1845 # The email address has been stored 1846 self.assertEqual(report.email, 'aa@aa.aa') 1846 1847 # Referee can use mandate again to download the pdf report 1847 1848 self.browser.open('http://localhost/app/mandate?mandate_id=%s' … … 1875 1876 self.assertEqual(self.browser.headers['Content-Type'], 1876 1877 'application/pdf') 1877 path = os.path.join(samples_dir(), 'referee_report_slip.pdf')1878 open(path, 'wb').write(self.browser.contents)1879 print "Sample PDF referee_report_slip.pdf written to %s" % path1880 1878 # Mandate is not deleted ... 1881 1879 self.assertEqual(len(self.app['mandates'].keys()), 2) … … 1888 1886 self.app['mandates'][mandate.mandate_id].params['redirect_path2'], 1889 1887 redirect_path2) 1888 # Portal managers can edit referee reports (no button available!) 1889 self.browser.open(self.view_path + '/%s/manage' % report.r_id) 1890 self.browser.getControl(name="form.email_pref").value = 'bb@bb.de' 1891 self.browser.getControl("Save").click() 1892 self.assertEqual(report.email_pref, 'bb@bb.de') 1890 1893 # Managers can delete referee reports 1891 1894 self.browser.open(self.manage_path) … … 1896 1899 self.assertTrue('Referee report removed.' in self.browser.contents) 1897 1900 self.assertEqual(self.browser.url, self.view_path) 1898 # Report creation and deletion is logged1901 # Report creation, managing and deletion is logged 1899 1902 logfile = os.path.join( 1900 1903 self.app['datacenter'].storage, 'logs', 'applicants.log') … … 1904 1907 '%s - added: %s\n' % (self.applicant.applicant_id, report.r_id) 1905 1908 in logcontent) 1909 self.assertTrue( 1910 'zope.mgr - applicants.browser.RefereeReportManageFormPage - ' 1911 '%s - %s - saved: email_pref\n' % ( 1912 self.applicant.applicant_id, report.r_id) in logcontent) 1906 1913 self.assertTrue( 1907 1914 'zope.mgr - applicants.browser.RemoveRefereeReportPage - '
Note: See TracChangeset for help on using the changeset viewer.