Changeset 6658
- Timestamp:
- 2 Sep 2011, 11:43:39 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_root.py
r6578 r6658 43 43 44 44 45 46 47 45 class FakeSite(dict): 48 46 pass … … 53 51 54 52 def setUp(self): 53 remove_logger('waeup.sirp.app.applicants') 55 54 super(ApplicantsRootTestCase, self).setUp() 56 remove_logger('waeup.sirp.app.applicants')57 self.old_loggers = get_all_loggers()58 55 # Setup a sample site for each test 59 60 56 # Prepopulate the ZODB... 61 57 app = University() … … 63 59 self.app = self.getRootFolder()['app'] 64 60 setSite(self.app) 65 66 61 self.dc_root = tempfile.mkdtemp() 67 62 app['datacenter'].setStoragePath(self.dc_root) 68 69 63 return 70 64 71 65 def tearDown(self): 72 66 super(ApplicantsRootTestCase, self).tearDown() 73 remove_new_loggers(self.old_loggers)74 67 shutil.rmtree(self.dc_root) 68 clearSite() 75 69 return 76 70 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_permissions.py
r6645 r6658 30 30 import shutil 31 31 import tempfile 32 from zope.app.testing.functional import FunctionalTestCase33 32 from zope.app.testing.functional import HTTPCaller as http 34 33 from zope.component import createObject … … 77 76 def setUp(self): 78 77 super(PermissionTest, self).setUp() 79 #remove_logger('waeup.sirp.app')80 self.old_loggers = get_all_loggers()81 78 # Set up a complete university to have every page available... 82 79 app = University() … … 104 101 pass 105 102 106 #def cleanUp(self):107 # super(PermissionTest, self).cleanUp()108 # clearSite()109 # shutil.rmtree(self.dc_root)110 111 103 def tearDown(self): 112 104 super(PermissionTest, self).tearDown() 113 remove_new_loggers(self.old_loggers)105 clearSite() 114 106 shutil.rmtree(self.dc_root) 115 107 return -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_container.py
r6641 r6658 39 39 40 40 def setUp(self): 41 remove_logger('waeup.sirp.app.students') 41 42 super(StudentsContainerTestCase, self).setUp() 42 remove_logger('waeup.sirp.app.students')43 self.old_loggers = get_all_loggers()44 43 # Setup a sample site for each test 45 46 44 # Prepopulate the ZODB... 47 45 app = University() … … 49 47 self.app = self.getRootFolder()['app'] 50 48 setSite(self.app) 51 52 49 self.dc_root = tempfile.mkdtemp() 53 50 app['datacenter'].setStoragePath(self.dc_root) … … 56 53 def tearDown(self): 57 54 super(StudentsContainerTestCase, self).tearDown() 58 remove_new_loggers(self.old_loggers)55 clearSite() 59 56 shutil.rmtree(self.dc_root) 60 57 return -
main/waeup.sirp/trunk/src/waeup/sirp/testing.py
r6578 r6658 27 27 28 28 def remove_new_loggers(old_loggers): 29 """Remove the loggers in`old_loggers`.29 """Remove the loggers except `old_loggers`. 30 30 31 31 `old_loggers` is a list of logger keys as returned by
Note: See TracChangeset for help on using the changeset viewer.