Commit 051853ab authored by Tres Seaver's avatar Tres Seaver

Rely on refactored base class from ZConfig for testing logging.

parent 5d1ad400
...@@ -58,7 +58,7 @@ setup(name='Zope2', ...@@ -58,7 +58,7 @@ setup(name='Zope2',
'Products.ZCTextIndex', 'Products.ZCTextIndex',
'Record', 'Record',
'RestrictedPython', 'RestrictedPython',
'ZConfig', 'ZConfig >= 2.9.2',
'ZODB3', 'ZODB3',
'ZopeUndo', 'ZopeUndo',
'docutils', 'docutils',
......
...@@ -23,8 +23,8 @@ import tempfile ...@@ -23,8 +23,8 @@ import tempfile
import unittest import unittest
import ZConfig import ZConfig
from ZConfig.components.logger.tests import test_logger
from ZConfig.components.logger.loghandler import NullHandler from ZConfig.components.logger.tests.test_logger import LoggingTestHelper
import Zope2.Startup import Zope2.Startup
import Products import Products
...@@ -50,15 +50,14 @@ for name in (None, 'trace', 'access'): ...@@ -50,15 +50,14 @@ for name in (None, 'trace', 'access'):
'handlers':logger.handlers, 'handlers':logger.handlers,
'filters':logger.filters} 'filters':logger.filters}
class ZopeStarterTestCase(test_logger.LoggingTestBase): class ZopeStarterTestCase(LoggingTestHelper, unittest.TestCase):
schema = None schema = None
def setUp(self): def setUp(self):
from ZConfig.components.logger import loghandler
if self.schema is None: if self.schema is None:
ZopeStarterTestCase.schema = getSchema() ZopeStarterTestCase.schema = getSchema()
test_logger.LoggingTestBase.setUp(self) LoggingTestHelper.setUp(self)
def tearDown(self): def tearDown(self):
try: try:
...@@ -69,7 +68,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase): ...@@ -69,7 +68,7 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase):
Products.__path__ = [d for d in Products.__path__ Products.__path__ = [d for d in Products.__path__
if os.path.exists(d)] if os.path.exists(d)]
test_logger.LoggingTestBase.tearDown(self) LoggingTestHelper.tearDown(self)
# reset logger states # reset logger states
for name in (None, 'access', 'trace'): for name in (None, 'access', 'trace'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment