From 2f70de6feb730f69ca3fb119be71a11e89754d09 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 11 May 2026 11:29:28 +0200 Subject: [PATCH 1/2] test(django): Check transaction annotations on transaction events --- tests/integrations/django/test_basic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index f14be92ceb..fde156b1ae 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -723,15 +723,16 @@ def test_transaction_style( ): sentry_init( integrations=[DjangoIntegration(transaction_style=transaction_style)], + traces_sample_rate=1.0, send_default_pii=True, ) events = capture_events() content, status, headers = unpack_werkzeug_response(client.get(client_url)) assert content == expected_response - (event,) = events - assert event["transaction"] == expected_transaction - assert event["transaction_info"] == {"source": expected_source} + (_, transaction) = events + assert transaction["transaction"] == expected_transaction + assert transaction["transaction_info"] == {"source": expected_source} def test_request_body(sentry_init, client, capture_events): From 89b7b93e6c3350029c96e12dfe32c3fcb9e68dc6 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 11 May 2026 11:31:13 +0200 Subject: [PATCH 2/2] . --- tests/integrations/django/test_basic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index fde156b1ae..fa12bf9b60 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -730,7 +730,8 @@ def test_transaction_style( content, status, headers = unpack_werkzeug_response(client.get(client_url)) assert content == expected_response - (_, transaction) = events + (error, transaction) = events + assert error["transaction"] == expected_transaction assert transaction["transaction"] == expected_transaction assert transaction["transaction_info"] == {"source": expected_source}