Skip to content

Commit 5a41fb8

Browse files
committed
fix: use __call__ in fake transport
1 parent aa88148 commit 5a41fb8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/sentry/fake_sentry_transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ class FakeSentryTransport:
1313
def __init__(self):
1414
self.events: list[sentry_sdk.types.Event] = []
1515

16-
def __callable__(self, event: sentry_sdk.types.Event) -> None:
16+
def __call__(self, event: sentry_sdk.types.Event) -> None:
1717
self.events.append(event)

tests/sentry/test_interceptor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def transport() -> FakeSentryTransport:
2929
def sentry_init(transport: FakeSentryTransport) -> None:
3030
"""Initialize Sentry for testing."""
3131
sentry_sdk.init(
32-
# Pass __callable__ explicitly so SDK treats it as Callable[[Event], None]
33-
# it confuses it otherwise
34-
transport=transport.__callable__,
32+
transport=transport,
3533
integrations=[
3634
AsyncioIntegration(),
3735
],

0 commit comments

Comments
 (0)