Changeset 6442 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 21 Jun 2011, 00:43:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_root.py
r6120 r6442 48 48 pass 49 49 50 class ApplicantsRootTestCase(unittest.TestCase): 50 class ApplicantsRootTestCase(FunctionalTestCase): 51 52 layer = FunctionalLayer 53 54 def setUp(self): 55 super(ApplicantsRootTestCase, self).setUp() 56 57 # Setup a sample site for each test 58 app = University() 59 self.dc_root = tempfile.mkdtemp() 60 app['datacenter'].setStoragePath(self.dc_root) 61 62 # Prepopulate the ZODB... 63 self.getRootFolder()['app'] = app 64 self.app = self.getRootFolder()['app'] 65 setSite(self.app) 66 return 67 68 def tearDown(self): 69 super(ApplicantsRootTestCase, self).tearDown() 70 shutil.rmtree(self.dc_root) 71 return 51 72 52 73 def test_interfaces(self): … … 61 82 ) 62 83 return 84 85 def test_logger(self): 86 # We can get a logger from root 87 logger = self.app['applicants'].logger 88 assert logger is not None 89 assert logger.name == 'waeup.sirp.app.applicants' 90 handlers = logger.handlers 91 assert len(handlers) == 1 92 filename = logger.handlers[0].baseFilename 93 assert filename.endswith('applicants.log') 94 assert filename.startswith(self.dc_root) 63 95 64 96 class ApplicantsRootPluginTestCase(unittest.TestCase):
Note: See TracChangeset for help on using the changeset viewer.