From 2f693360b4cf7616c6e1ff5573aedeab801e88b8 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 6 Dec 2018 15:35:58 -0500 Subject: [PATCH] Ignore MoxStubout deprecation warnings Like how we ignore mox3 usage warnings, we can ignore MoxStubout deprecation warnings as well. In a py35 unit test run, these warnings show up over 1000 times (probably closer to 17K+ based on the number of unit tests we run) and bloat the console logs. Change-Id: I598999303c8e91f448e48dea1049a24332ba2f53 Closes-Bug: #1778784 --- nova/tests/fixtures.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/tests/fixtures.py b/nova/tests/fixtures.py index 615c223fc250..8459a4830f8a 100644 --- a/nova/tests/fixtures.py +++ b/nova/tests/fixtures.py @@ -821,6 +821,8 @@ class WarningsFixture(fixtures.Fixture): # about any deprecations coming from it warnings.filterwarnings('ignore', module='mox3.mox') + # NOTE(gibi): we can remove this once we get rid of Mox in nova + warnings.filterwarnings('ignore', message="Using class 'MoxStubout'") # NOTE(mriedem): Ignore scope check UserWarnings from oslo.policy. warnings.filterwarnings('ignore', message="Policy .* failed scope check",