Ignore:
Timestamp:
21 Jun 2011, 00:52:00 (14 years ago)
Author:
uli
Message:

Add tests for applicants root logger.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_root.py

    r6442 r6443  
    9494        assert filename.startswith(self.dc_root)
    9595
     96    def test_logger_multiple(self):
     97        # Make sure the logger is still working after 2nd call
     98        # First time we call it, it might be registered
     99        logger = self.app['applicants'].logger
     100        # At second call the already registered logger should be returned
     101        logger = self.app['applicants'].logger
     102        assert logger is not None
     103        assert logger.name == 'waeup.sirp.app.applicants'
     104        handlers = logger.handlers
     105        assert len(handlers) == 1
     106        filename = logger.handlers[0].baseFilename
     107        assert filename.endswith('applicants.log')
     108        assert filename.startswith(self.dc_root)
     109
    96110class ApplicantsRootPluginTestCase(unittest.TestCase):
    97111    def create_logger(self):
Note: See TracChangeset for help on using the changeset viewer.