Ignore:
Timestamp:
7 Jan 2013, 08:30:59 (12 years ago)
Author:
Henrik Bettermann
Message:

Put job_id into filename and log job_id in order to identify who has created, downloaded and discarded exports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py

    r9836 r9837  
    211211                         'text/csv; charset=UTF-8')
    212212        self.assertEqual(self.browser.headers['content-disposition'],
    213                          'attachment; filename="WAeUP.Kofa_faculties.csv')
     213            'attachment; filename="WAeUP.Kofa_faculties_%s.csv' % job_id)
    214214        self.assertEqual(self.browser.contents,
    215215            'code,title,title_prefix,users_with_local_roles\r\n'
     
    227227                        'faculties, job_id=' in logcontent)
    228228        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)
    230231        return
    231232
     
    298299        self.browser.getLink("Download").click()
    299300        self.assertEqual(self.browser.headers['content-type'],
    300                          'text/csv; charset=UTF-8')
     301          'text/csv; charset=UTF-8')
    301302        self.assertEqual(self.browser.headers['content-disposition'],
    302                          'attachment; filename="WAeUP.Kofa_students.csv')
     303          'attachment; filename="WAeUP.Kofa_students_%s.csv' % job_id)
    303304        # No students yet
    304305        self.assertEqual(self.browser.contents,
     
    319320        self.assertTrue(
    320321            '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)
    322324        return
    323325
Note: See TracChangeset for help on using the changeset viewer.