Skip to content

Commit 6814df9

Browse files
authored
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.
1 parent 0934e04 commit 6814df9

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

tests/integrations/bottle/test_bottle.py

-48
Original file line numberDiff line numberDiff line change
@@ -337,29 +337,6 @@ def index():
337337
assert len(events) == 1
338338

339339

340-
def test_logging(sentry_init, capture_events, app, get_client):
341-
# ensure that Bottle's logger magic doesn't break ours
342-
sentry_init(
343-
integrations=[
344-
bottle_sentry.BottleIntegration(),
345-
LoggingIntegration(event_level="ERROR"),
346-
]
347-
)
348-
349-
@app.route("/")
350-
def index():
351-
app.logger.error("hi")
352-
return "ok"
353-
354-
events = capture_events()
355-
356-
client = get_client()
357-
client.get("/")
358-
359-
(event,) = events
360-
assert event["level"] == "error"
361-
362-
363340
def test_mount(app, capture_exceptions, capture_events, sentry_init, get_client):
364341
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
365342

@@ -387,31 +364,6 @@ def crashing_app(environ, start_response):
387364
assert event["exception"]["values"][0]["mechanism"]["handled"] is False
388365

389366

390-
def test_500(sentry_init, capture_events, app, get_client):
391-
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
392-
393-
set_debug(False)
394-
app.catchall = True
395-
396-
@app.route("/")
397-
def index():
398-
1 / 0
399-
400-
@app.error(500)
401-
def error_handler(err):
402-
capture_message("error_msg")
403-
return "My error"
404-
405-
events = capture_events()
406-
407-
client = get_client()
408-
response = client.get("/")
409-
assert response[1] == "500 Internal Server Error"
410-
411-
_, event = events
412-
assert event["message"] == "error_msg"
413-
414-
415367
def test_error_in_errorhandler(sentry_init, capture_events, app, get_client):
416368
sentry_init(integrations=[bottle_sentry.BottleIntegration()])
417369

0 commit comments

Comments
 (0)