diff options
Diffstat (limited to 'openstackclient/tests')
| -rw-r--r-- | openstackclient/tests/common/test_context.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openstackclient/tests/common/test_context.py b/openstackclient/tests/common/test_context.py index 145546a3..8e1bcf83 100644 --- a/openstackclient/tests/common/test_context.py +++ b/openstackclient/tests/common/test_context.py @@ -62,6 +62,15 @@ class TestContext(utils.TestCase): context.setup_logging(shell, cloud_config) self.assertEqual(True, shell.enable_operation_logging) + @mock.patch('warnings.simplefilter') + def test_set_warning_filter(self, simplefilter): + context.set_warning_filter(logging.ERROR) + simplefilter.assert_called_with("ignore") + context.set_warning_filter(logging.WARNING) + simplefilter.assert_called_with("ignore") + context.set_warning_filter(logging.INFO) + simplefilter.assert_called_with("once") + class Test_LogContext(utils.TestCase): def setUp(self): |
