Changeset 9837 for main/waeup.kofa
- Timestamp:
- 7 Jan 2013, 08:30:59 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9836 r9837 1589 1589 acronym = grok.getSite()['configuration'].acronym.replace(' ','') 1590 1590 filename = "%s_%s" % (acronym, os.path.basename(path)) 1591 filename = filename.replace('.csv', '_%s.csv' % job_id) 1591 1592 self.response.setHeader( 1592 1593 'Content-Type', 'text/csv; charset=UTF-8') -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r9836 r9837 211 211 'text/csv; charset=UTF-8') 212 212 self.assertEqual(self.browser.headers['content-disposition'], 213 'attachment; filename="WAeUP.Kofa_faculties.csv')213 'attachment; filename="WAeUP.Kofa_faculties_%s.csv' % job_id) 214 214 self.assertEqual(self.browser.contents, 215 215 'code,title,title_prefix,users_with_local_roles\r\n' … … 227 227 'faculties, job_id=' in logcontent) 228 228 self.assertTrue('zope.mgr - browser.pages.ExportCSVView - ' 229 'downloaded: WAeUP.Kofa_faculties.csv, job_id=' in logcontent) 229 'downloaded: WAeUP.Kofa_faculties_%s.csv, job_id=%s' 230 % (job_id, job_id) in logcontent) 230 231 return 231 232 … … 298 299 self.browser.getLink("Download").click() 299 300 self.assertEqual(self.browser.headers['content-type'], 300 301 'text/csv; charset=UTF-8') 301 302 self.assertEqual(self.browser.headers['content-disposition'], 302 'attachment; filename="WAeUP.Kofa_students.csv')303 'attachment; filename="WAeUP.Kofa_students_%s.csv' % job_id) 303 304 # No students yet 304 305 self.assertEqual(self.browser.contents, … … 319 320 self.assertTrue( 320 321 'zope.mgr - browser.pages.ExportCSVView ' 321 '- downloaded: WAeUP.Kofa_students.csv, job_id=' in logcontent) 322 '- downloaded: WAeUP.Kofa_students_%s.csv, job_id=%s' 323 % (job_id, job_id) in logcontent) 322 324 return 323 325 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9836 r9837 2762 2762 'text/csv; charset=UTF-8') 2763 2763 self.assertTrue( 2764 'filename="WAeUP.Kofa_students .csv'in2764 'filename="WAeUP.Kofa_students_%s.csv' % job_id in 2765 2765 self.browser.headers['content-disposition']) 2766 2766 self.assertEqual(len(self.app['datacenter'].running_exports), 1) … … 2780 2780 self.assertTrue( 2781 2781 'zope.mgr - students.browser.ExportJobContainerDownload ' 2782 '- downloaded: WAeUP.Kofa_students.csv, job_id=' 2782 '- downloaded: WAeUP.Kofa_students_%s.csv, job_id=%s' 2783 % (job_id, job_id) 2783 2784 ) 2784 2785 self.assertTrue( 2785 2786 'zope.mgr - students.browser.ExportJobContainerOverview ' 2786 '- discarded: job_id= '2787 '- discarded: job_id=%s' % job_id 2787 2788 )
Note: See TracChangeset for help on using the changeset viewer.