From d0ef6fd4b543dfed1333527e5a92c57bdc6f8859 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 25 Oct 2017 17:07:34 +0100 Subject: [PATCH] test: Store the OutputStreamCapture fixture This allows us to access stdout and stderr from tests. Change-Id: I912ccfd04b15ed16713d23e3e5cab72889d4d233 Signed-off-by: Stephen Finucane --- nova/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/test.py b/nova/test.py index 9e245ac63398..f3a682980a3b 100644 --- a/nova/test.py +++ b/nova/test.py @@ -230,7 +230,8 @@ class TestCase(testtools.TestCase): self.useFixture(fixtures.TempHomeDir()) self.useFixture(log_fixture.get_logging_handle_error_fixture()) - self.useFixture(nova_fixtures.OutputStreamCapture()) + self.output = nova_fixtures.OutputStreamCapture() + self.useFixture(self.output) self.stdlog = nova_fixtures.StandardLogging() self.useFixture(self.stdlog)