Ignore:
Timestamp:
24 Apr 2014, 08:18:37 (11 years ago)
Author:
Henrik Bettermann
Message:

Add log message.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r11597 r11602  
    204204        else:
    205205            self.flash(_('Matriculation number %s assigned.' % mnumber))
     206            self.context.writeLogMessage(self, '%s assigned' % mnumber)
    206207        self.redirect(self.url(self.context))
    207208        return
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r11597 r11602  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
     18import os
    1819import shutil
    1920import tempfile
     
    357358            LinkNotFoundError,
    358359            self.browser.getLink, 'Get Matriculation Number')
    359         return
    360 
     360        # Setting matric number is logged.
     361        logfile = os.path.join(
     362            self.app['datacenter'].storage, 'logs', 'students.log')
     363        logcontent = open(logfile).read()
     364        self.assertTrue('E1000000 - waeup.aaue.students.browser.StudentGetMatricNumberPage - '
     365                        'E1000000 - PTP/fac1/dep1/04/00001 assigned' in logcontent)
     366        return
     367
Note: See TracChangeset for help on using the changeset viewer.