Skip to content

Commit 5ee9fb6

Browse files
resolve django test failures
1 parent 5653f6c commit 5ee9fb6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/integrations/django/test_basic.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,8 +2454,14 @@ def test_transaction_http_method_custom(
24542454
sentry_sdk.flush()
24552455
spans = [item.payload for item in items]
24562456

2457-
assert spans[2]["attributes"][SPANDATA.HTTP_REQUEST_METHOD] == "OPTIONS"
2458-
assert spans[5]["attributes"][SPANDATA.HTTP_REQUEST_METHOD] == "HEAD"
2457+
http_methods = [
2458+
span["attributes"][SPANDATA.HTTP_REQUEST_METHOD]
2459+
for span in spans
2460+
if span.get("parent_span_id") is None
2461+
]
2462+
2463+
assert "OPTIONS" in http_methods
2464+
assert "HEAD" in http_methods
24592465
else:
24602466
events = capture_events()
24612467

0 commit comments

Comments
 (0)