Merge "per test_method logging"
This commit is contained in:
@@ -168,6 +168,11 @@ class BaseTestCase(testtools.TestCase,
|
|||||||
os.environ.get('OS_STDERR_CAPTURE') == '1'):
|
os.environ.get('OS_STDERR_CAPTURE') == '1'):
|
||||||
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
|
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
|
||||||
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
|
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
|
||||||
|
if (os.environ.get('OS_LOG_CAPTURE') != 'False' and
|
||||||
|
os.environ.get('OS_LOG_CAPTURE') != '0'):
|
||||||
|
log_format = '%(asctime)-15s %(message)s'
|
||||||
|
self.useFixture(fixtures.LoggerFixture(nuke_handlers=False,
|
||||||
|
format=log_format))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_identity_admin_client(cls):
|
def _get_identity_admin_client(cls):
|
||||||
|
|||||||
Reference in New Issue
Block a user