Changeset 9326 for main/waeup.kofa


Ignore:
Timestamp:
10 Oct 2012, 21:14:45 (12 years ago)
Author:
Henrik Bettermann
Message:

Exports must be logged.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/browser
Files:
2 edited

Legend:

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

    r9323 r9326  
    15351535    grok.require('waeup.manageDataCenter')
    15361536
    1537     def render(self, exporter=None, job_id=None):
     1537    def render(self, job_id=None):
    15381538
    15391539        manager = getUtility(IJobManager)
     
    15581558        self.context.delete_export_entry(
    15591559            self.context.entry_from_job_id(job_id))
     1560        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
     1561        self.context.logger.info('%s - exported: %s' % (ob_class, filename))
    15601562        return result
    15611563
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py

    r9290 r9326  
    225225        self.assertEqual(result, None)
    226226        self.assertEqual(self.stored_in_datacenter(job_id), False)
    227         #logfile = os.path.join(
    228         #    self.app['datacenter'].storage, 'logs', 'datacenter.log')
    229         #logcontent = open(logfile).read()
    230         #self.assertTrue('zope.mgr - browser.pages.ExportCSVView - '
    231         #                'exported: faculties' in logcontent)
     227        logfile = os.path.join(
     228            self.app['datacenter'].storage, 'logs', 'datacenter.log')
     229        logcontent = open(logfile).read()
     230        self.assertTrue('zope.mgr - browser.pages.ExportCSVView - '
     231                        'exported: WAeUP.Kofa_faculties.csv' in logcontent)
    232232        return
    233233
Note: See TracChangeset for help on using the changeset viewer.