From 89a8f72960893b492fc5c69b3a150233c06db8b0 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 5 Oct 2022 17:48:32 +0100 Subject: [PATCH] tests: Enable logging fixture Quieten the output of our test runs significantly. Change-Id: Ie32c919bb987eb0b9bc4c5b2ec54ee20a6841c03 Signed-off-by: Stephen Finucane --- openstackclient/network/v2/local_ip_association.py | 2 +- openstackclient/tests/unit/utils.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openstackclient/network/v2/local_ip_association.py b/openstackclient/network/v2/local_ip_association.py index d54ac9c90d..9f8325be40 100644 --- a/openstackclient/network/v2/local_ip_association.py +++ b/openstackclient/network/v2/local_ip_association.py @@ -124,7 +124,7 @@ class DeleteLocalIPAssociation(command.Command): "fixed port " "name or ID '%(fixed_port_id)s': %(e)s" ), - {'fixed port ID': fixed_port_id, 'e': e}, + {'fixed_port_id': fixed_port_id, 'e': e}, ) if result > 0: diff --git a/openstackclient/tests/unit/utils.py b/openstackclient/tests/unit/utils.py index 1691424c68..93f548876a 100644 --- a/openstackclient/tests/unit/utils.py +++ b/openstackclient/tests/unit/utils.py @@ -51,6 +51,8 @@ class TestCase(testtools.TestCase): stderr = self.useFixture(fixtures.StringStream("stderr")).stream self.useFixture(fixtures.MonkeyPatch("sys.stderr", stderr)) + self.log = self.useFixture(fixtures.LoggerFixture()) + def assertNotCalled(self, m, msg=None): """Assert a function was not called"""