Changeset 6578 for main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests
- Timestamp:
- 6 Aug 2011, 11:11:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_root.py
r6443 r6578 28 28 import unittest 29 29 from StringIO import StringIO 30 from zope.app.testing.functional import FunctionalTestCase 31 from zope.component.hooks import setSite, clearSite 30 from zope.component.hooks import setSite 32 31 from zope.interface.verify import verifyClass, verifyObject 33 from zope.site import LocalSiteManager34 32 from waeup.sirp.app import University 35 33 from waeup.sirp.applicants import ( … … 40 38 ApplicantsRoot, ApplicantsPlugin, 41 39 ) 42 from waeup.sirp.testing import FunctionalLayer 40 from waeup.sirp.testing import ( 41 FunctionalLayer, FunctionalTestCase, get_all_loggers, remove_new_loggers, 42 remove_logger) 43 43 44 44 … … 54 54 def setUp(self): 55 55 super(ApplicantsRootTestCase, self).setUp() 56 56 remove_logger('waeup.sirp.app.applicants') 57 self.old_loggers = get_all_loggers() 57 58 # Setup a sample site for each test 59 60 # Prepopulate the ZODB... 58 61 app = University() 59 self.dc_root = tempfile.mkdtemp()60 app['datacenter'].setStoragePath(self.dc_root)61 62 # Prepopulate the ZODB...63 62 self.getRootFolder()['app'] = app 64 63 self.app = self.getRootFolder()['app'] 65 64 setSite(self.app) 65 66 self.dc_root = tempfile.mkdtemp() 67 app['datacenter'].setStoragePath(self.dc_root) 68 66 69 return 67 70 68 71 def tearDown(self): 69 72 super(ApplicantsRootTestCase, self).tearDown() 73 remove_new_loggers(self.old_loggers) 70 74 shutil.rmtree(self.dc_root) 71 75 return
Note: See TracChangeset for help on using the changeset viewer.