Skip to content

Commit 979c7d4

Browse files
tests(pyreqwest): Drop send_default_pii support in tests (#7712)
1 parent cf47bad commit 979c7d4

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

‎tests/integrations/pyreqwest/test_pyreqwest.py‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -594,12 +594,10 @@ def fake_start_span(*args, **kwargs):
594594
assert SPANDATA.CODE_FUNCTION in data
595595

596596

597-
@pytest.mark.parametrize("send_default_pii", [True, False])
598597
def test_crumb_capture(
599598
sentry_init,
600599
capture_events,
601600
server_port,
602-
send_default_pii,
603601
):
604602
def before_breadcrumb(crumb, hint):
605603
crumb["data"]["extra"] = "foo"
@@ -608,7 +606,6 @@ def before_breadcrumb(crumb, hint):
608606
sentry_init(
609607
integrations=[PyreqwestIntegration()],
610608
before_breadcrumb=before_breadcrumb,
611-
send_default_pii=send_default_pii,
612609
data_collection={},
613610
)
614611

@@ -633,25 +630,21 @@ def before_breadcrumb(crumb, hint):
633630
SPANDATA.HTTP_STATUS_CODE: 200,
634631
"extra": "foo",
635632
}
636-
if send_default_pii:
637-
expected["url"] = f"http://localhost:{server_port}/hello?q=test#frag"
638-
expected[SPANDATA.HTTP_QUERY] = "q=test"
639-
expected[SPANDATA.HTTP_FRAGMENT] = "frag"
633+
expected["url"] = f"http://localhost:{server_port}/hello?q=test#frag"
634+
expected[SPANDATA.HTTP_QUERY] = "q=test"
635+
expected[SPANDATA.HTTP_FRAGMENT] = "frag"
640636

641637
assert crumb["data"] == ApproxDict(expected)
642638

643639

644640
@pytest.mark.asyncio
645-
@pytest.mark.parametrize("send_default_pii", [True, False])
646641
async def test_async_crumb_capture(
647642
sentry_init,
648643
capture_events,
649644
server_port,
650-
send_default_pii,
651645
):
652646
sentry_init(
653647
integrations=[PyreqwestIntegration()],
654-
send_default_pii=send_default_pii,
655648
data_collection={},
656649
)
657650

@@ -676,10 +669,9 @@ async def test_async_crumb_capture(
676669
SPANDATA.HTTP_METHOD: "GET",
677670
SPANDATA.HTTP_STATUS_CODE: 200,
678671
}
679-
if send_default_pii:
680-
expected["url"] = f"http://localhost:{server_port}/hello?q=test#frag"
681-
expected[SPANDATA.HTTP_QUERY] = "q=test"
682-
expected[SPANDATA.HTTP_FRAGMENT] = "frag"
672+
expected["url"] = f"http://localhost:{server_port}/hello?q=test#frag"
673+
expected[SPANDATA.HTTP_QUERY] = "q=test"
674+
expected[SPANDATA.HTTP_FRAGMENT] = "frag"
683675

684676
assert crumb["data"] == ApproxDict(expected)
685677

0 commit comments

Comments
 (0)