There was an error while loading. Please reload this page.
1 parent 5653f6c commit 5ee9fb6Copy full SHA for 5ee9fb6
1 file changed
tests/integrations/django/test_basic.py
@@ -2454,8 +2454,14 @@ def test_transaction_http_method_custom(
2454
sentry_sdk.flush()
2455
spans = [item.payload for item in items]
2456
2457
- assert spans[2]["attributes"][SPANDATA.HTTP_REQUEST_METHOD] == "OPTIONS"
2458
- assert spans[5]["attributes"][SPANDATA.HTTP_REQUEST_METHOD] == "HEAD"
+ http_methods = [
+ 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
2465
else:
2466
events = capture_events()
2467
0 commit comments