@@ -715,21 +715,18 @@ async def _get_item(item_id: int):
715715
716716@pytest .mark .parametrize ("span_streaming" , [True , False ])
717717@pytest .mark .parametrize (
718- "data_collection,send_default_pii, expect_body" ,
718+ "data_collection,expect_body" ,
719719 [
720- pytest .param (None , True , True , id = "legacy_pii_enabled" ),
721- pytest .param (None , False , False , id = "legacy_pii_disabled" ),
720+ pytest .param ({}, True , id = "data_collection_http_bodies_default" ),
722721 pytest .param (
723- {"http_bodies" : []},
722+ {"http_bodies" : ["incoming_request" ]},
724723 True ,
725- False ,
726- id = "data_collection_wins_over_send_default_pii" ,
724+ id = "data_collection_http_bodies_incoming_request" ,
727725 ),
728726 pytest .param (
729- {"http_bodies" : ["incoming_request" ]},
727+ {"http_bodies" : []},
730728 False ,
731- True ,
732- id = "data_collection_allows_request_body" ,
729+ id = "data_collection_http_bodies_empty" ,
733730 ),
734731 ],
735732)
@@ -739,20 +736,15 @@ def test_global_dependency_captures_request_data(
739736 capture_items ,
740737 span_streaming ,
741738 data_collection ,
742- send_default_pii ,
743739 expect_body ,
744740):
745- init_kwargs = {
746- "auto_enabling_integrations" : False ,
747- "integrations" : [StarletteIntegration (), FastApiIntegration ()],
748- "traces_sample_rate" : 1.0 ,
749- "trace_lifecycle" : "stream" if span_streaming else "static" ,
750- "data_collection" : data_collection ,
751- }
752- if send_default_pii is not None :
753- init_kwargs ["send_default_pii" ] = send_default_pii
754-
755- sentry_init (** init_kwargs )
741+ sentry_init (
742+ auto_enabling_integrations = False ,
743+ integrations = [StarletteIntegration (), FastApiIntegration ()],
744+ traces_sample_rate = 1.0 ,
745+ trace_lifecycle = "stream" if span_streaming else "static" ,
746+ data_collection = data_collection ,
747+ )
756748
757749 app = FastAPI ()
758750
0 commit comments