We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31b880c commit f128c0eCopy full SHA for f128c0e
tests/integrations/bottle/test_bottle.py
@@ -62,7 +62,7 @@ def test_has_context(sentry_init, app, capture_events, get_client):
62
@pytest.mark.parametrize(
63
"url,transaction_style,expected_transaction,expected_source",
64
[
65
- ("/message", "endpoint", "test_bottle.app.<locals>.hi", "component"),
+ ("/message", "endpoint", "hi", "component"),
66
("/message", "url", "/message", "route"),
67
("/message/123456", "url", "/message/<message_id>", "route"),
68
("/message-named-route", "endpoint", "hi", "component"),
@@ -89,7 +89,9 @@ def test_transaction_style(
89
assert response[1] == "200 OK"
90
91
(event,) = events
92
- assert event["transaction"] == expected_transaction
+ # We use endswith() because in Python 2.7 it is "test_bottle.hi"
93
+ # and in later Pythons "test_bottle.app.<locals>.hi"
94
+ assert event["transaction"].endswith(".{}".format(expected_transaction))
95
assert event["transaction_info"] == {"source": expected_source}
96
97
0 commit comments