diff options
author | Arnav Kumar <arnav@arnavkumar.com> | 2016-01-25 12:09:45 +0800 |
---|---|---|
committer | Arnav Kumar <arnav@arnavkumar.com> | 2016-01-25 12:10:17 +0800 |
commit | 0de40e8e191469127668158fb483f8020ad93ccd (patch) | |
tree | fcad1653181dcd5b1e845099cbeecc2af139330a | |
parent | 615fa4c6099288fbf873f04a0cc9fb86a96616b9 (diff) | |
download | raven-0de40e8e191469127668158fb483f8020ad93ccd.tar.gz |
Add test for excluding loggers during setup with Flask
-rw-r--r-- | tests/contrib/flask/tests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/contrib/flask/tests.py b/tests/contrib/flask/tests.py index 072cec8..dd0df26 100644 --- a/tests/contrib/flask/tests.py +++ b/tests/contrib/flask/tests.py @@ -263,6 +263,19 @@ class FlaskTest(BaseTest): assert self.middleware.last_event_id == event_id assert g.sentry_event_id == event_id + def test_logging_setup_with_exclusion_list(self): + app = Flask(__name__) + raven = TempStoreClient() + + Sentry(app, client=raven, logging=True, + logging_exclusions=("excluded_logger",)) + + excluded_logger = logging.getLogger("excluded_logger") + self.assertFalse(excluded_logger.propagate) + + some_other_logger = logging.getLogger("some_other_logger") + self.assertTrue(some_other_logger.propagate) + class FlaskLoginTest(BaseTest): |