From 6814df938c894835b727b6e83193154b962dc793 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 5 Sep 2024 17:14:42 +0200 Subject: [PATCH] tests: Remove broken bottle tests (#3505) The logger test never actually worked as designed (app.logger was never a thing). The 500 error doesn't really test any Bottle-related functionality. --- tests/integrations/bottle/test_bottle.py | 48 ------------------------ 1 file changed, 48 deletions(-) diff --git a/tests/integrations/bottle/test_bottle.py b/tests/integrations/bottle/test_bottle.py index c44327cea6..9dd23cf45a 100644 --- a/tests/integrations/bottle/test_bottle.py +++ b/tests/integrations/bottle/test_bottle.py @@ -337,29 +337,6 @@ def index(): assert len(events) == 1 -def test_logging(sentry_init, capture_events, app, get_client): - # ensure that Bottle's logger magic doesn't break ours - sentry_init( - integrations=[ - bottle_sentry.BottleIntegration(), - LoggingIntegration(event_level="ERROR"), - ] - ) - - @app.route("/") - def index(): - app.logger.error("hi") - return "ok" - - events = capture_events() - - client = get_client() - client.get("/") - - (event,) = events - assert event["level"] == "error" - - def test_mount(app, capture_exceptions, capture_events, sentry_init, get_client): sentry_init(integrations=[bottle_sentry.BottleIntegration()]) @@ -387,31 +364,6 @@ def crashing_app(environ, start_response): assert event["exception"]["values"][0]["mechanism"]["handled"] is False -def test_500(sentry_init, capture_events, app, get_client): - sentry_init(integrations=[bottle_sentry.BottleIntegration()]) - - set_debug(False) - app.catchall = True - - @app.route("/") - def index(): - 1 / 0 - - @app.error(500) - def error_handler(err): - capture_message("error_msg") - return "My error" - - events = capture_events() - - client = get_client() - response = client.get("/") - assert response[1] == "500 Internal Server Error" - - _, event = events - assert event["message"] == "error_msg" - - def test_error_in_errorhandler(sentry_init, capture_events, app, get_client): sentry_init(integrations=[bottle_sentry.BottleIntegration()])