Skip to content

Commit 887bfa0

Browse files
committed
consistency
1 parent 4cc8b8d commit 887bfa0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/integrations/django/test_basic.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ def test_has_trace_if_performance_enabled(sentry_init, client, capture_events):
161161
traces_sample_rate=1.0,
162162
)
163163
events = capture_events()
164-
response = client.head(reverse("view_exc_with_msg"))
165-
# Close the response to ensure the WSGI cycle is complete and the transaction is finished
166-
response.close()
164+
unpack_werkzeug_response(client.head(reverse("view_exc_with_msg")))
167165

168166
(msg_event, error_event, transaction_event) = events
169167

@@ -219,11 +217,9 @@ def test_trace_from_headers_if_performance_enabled(sentry_init, client, capture_
219217
trace_id = "582b43a4192642f0b136d5159a501701"
220218
sentry_trace_header = "{}-{}-{}".format(trace_id, "6e8f22c393e68f19", 1)
221219

222-
response = client.head(
220+
unpack_werkzeug_response(client.head(
223221
reverse("view_exc_with_msg"), headers={"sentry-trace": sentry_trace_header}
224-
)
225-
# Close the response to ensure the WSGI cycle is complete and the transaction is finished
226-
response.close()
222+
))
227223

228224
(msg_event, error_event, transaction_event) = events
229225

0 commit comments

Comments
 (0)