Skip to content

Commit 5a8898d

Browse files
committed
.
1 parent 9c99e56 commit 5a8898d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/integrations/bottle/test_bottle.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from io import BytesIO
66
from bottle import Bottle, debug as set_debug, abort, redirect, HTTPResponse
7-
from sentry_sdk import capture_message
7+
from sentry_sdk import capture_message, capture_exception
88
from sentry_sdk.consts import DEFAULT_MAX_VALUE_LENGTH
99
from sentry_sdk.integrations.bottle import BottleIntegration
1010

@@ -289,13 +289,15 @@ def test_request_body_not_included_when_disabled(
289289

290290
@app.route("/", method="POST")
291291
def index():
292-
1 / 0
292+
try:
293+
1 / 0
294+
except ZeroDivisionError:
295+
capture_exception()
293296

294297
events = capture_events()
295298

296299
client = get_client()
297-
with pytest.raises(ZeroDivisionError):
298-
client.post("/", json={"key": "value"})
300+
client.post("/", json={"key": "value"})
299301

300302
assert len(events) == 1
301303
event = events[0]

0 commit comments

Comments
 (0)