Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Sep 12, 2024
1 parent cbe977a commit cea750f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
26 changes: 18 additions & 8 deletions tests/integrations/django/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_has_trace_if_performance_enabled(sentry_init, client, capture_events):
sentry_init(
integrations=[
DjangoIntegration(
http_methods_to_capture=("HEAD", ),
http_methods_to_capture=("HEAD",),
)
],
traces_sample_rate=1.0,
Expand Down Expand Up @@ -190,9 +190,11 @@ def test_has_trace_if_performance_disabled(sentry_init, client, capture_events):

def test_trace_from_headers_if_performance_enabled(sentry_init, client, capture_events):
sentry_init(
integrations=[DjangoIntegration(
http_methods_to_capture=("HEAD", ),
)],
integrations=[
DjangoIntegration(
http_methods_to_capture=("HEAD",),
)
],
traces_sample_rate=1.0,
)

Expand Down Expand Up @@ -225,9 +227,11 @@ def test_trace_from_headers_if_performance_disabled(
sentry_init, client, capture_events
):
sentry_init(
integrations=[DjangoIntegration(
http_methods_to_capture=("HEAD", ),
)],
integrations=[
DjangoIntegration(
http_methods_to_capture=("HEAD",),
)
],
)

events = capture_events()
Expand Down Expand Up @@ -1168,6 +1172,9 @@ def test_span_origin(sentry_init, client, capture_events):


def test_transaction_http_method_default(sentry_init, client, capture_events):
"""
By default OPTIONS and HEAD requests do not create a transaction.
"""
sentry_init(
integrations=[DjangoIntegration()],
traces_sample_rate=1.0,
Expand All @@ -1188,7 +1195,10 @@ def test_transaction_http_method_custom(sentry_init, client, capture_events):
sentry_init(
integrations=[
DjangoIntegration(
http_methods_to_capture=("OPTIONS", "HEAD"),
http_methods_to_capture=(
"OPTIONS",
"head",
), # capitalization does not matter
)
],
traces_sample_rate=1.0,
Expand Down
5 changes: 4 additions & 1 deletion tests/integrations/flask/test_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,10 @@ def test_transaction_http_method_custom(
traces_sample_rate=1.0,
integrations=[
flask_sentry.FlaskIntegration(
http_methods_to_capture=("OPTIONS", "HEAD")
http_methods_to_capture=(
"OPTIONS",
"head",
) # capitalization does not matter
) # case does not matter
],
)
Expand Down

0 comments on commit cea750f

Please sign in to comment.