@@ -50,7 +50,7 @@ def test_view_exceptions(sentry_init, client, capture_exceptions, capture_events
5050 sentry_init (integrations = [DjangoIntegration ()], send_default_pii = True )
5151 exceptions = capture_exceptions ()
5252 events = capture_events ()
53- unpack_werkzeug_response ( client .get (reverse ("view_exc" ) ))
53+ client .get (reverse ("view_exc" ))
5454
5555 (error ,) = exceptions
5656 assert isinstance (error , ZeroDivisionError )
@@ -71,9 +71,7 @@ def test_ensures_x_forwarded_header_is_honored_in_sdk_when_enabled_in_django(
7171 sentry_init (integrations = [DjangoIntegration ()], send_default_pii = True )
7272 exceptions = capture_exceptions ()
7373 events = capture_events ()
74- unpack_werkzeug_response (
75- client .get (reverse ("view_exc" ), headers = {"X_FORWARDED_HOST" : "example.com" })
76- )
74+ client .get (reverse ("view_exc" ), headers = {"X_FORWARDED_HOST" : "example.com" })
7775
7876 (error ,) = exceptions
7977 assert isinstance (error , ZeroDivisionError )
@@ -92,9 +90,7 @@ def test_ensures_x_forwarded_header_is_not_honored_when_unenabled_in_django(
9290 sentry_init (integrations = [DjangoIntegration ()], send_default_pii = True )
9391 exceptions = capture_exceptions ()
9492 events = capture_events ()
95- unpack_werkzeug_response (
96- client .get (reverse ("view_exc" ), headers = {"X_FORWARDED_HOST" : "example.com" })
97- )
93+ client .get (reverse ("view_exc" ), headers = {"X_FORWARDED_HOST" : "example.com" })
9894
9995 (error ,) = exceptions
10096 assert isinstance (error , ZeroDivisionError )
@@ -106,7 +102,7 @@ def test_ensures_x_forwarded_header_is_not_honored_when_unenabled_in_django(
106102def test_middleware_exceptions (sentry_init , client , capture_exceptions ):
107103 sentry_init (integrations = [DjangoIntegration ()], send_default_pii = True )
108104 exceptions = capture_exceptions ()
109- unpack_werkzeug_response ( client .get (reverse ("middleware_exc" ) ))
105+ client .get (reverse ("middleware_exc" ))
110106
111107 (error ,) = exceptions
112108 assert isinstance (error , ZeroDivisionError )
@@ -160,7 +156,7 @@ def test_has_trace_if_performance_enabled(sentry_init, client, capture_events):
160156 traces_sample_rate = 1.0 ,
161157 )
162158 events = capture_events ()
163- unpack_werkzeug_response ( client .head (reverse ("view_exc_with_msg" ) ))
159+ client .head (reverse ("view_exc_with_msg" ))
164160
165161 (msg_event , error_event , transaction_event ) = events
166162
@@ -216,10 +212,8 @@ def test_trace_from_headers_if_performance_enabled(sentry_init, client, capture_
216212 trace_id = "582b43a4192642f0b136d5159a501701"
217213 sentry_trace_header = "{}-{}-{}" .format (trace_id , "6e8f22c393e68f19" , 1 )
218214
219- unpack_werkzeug_response (
220- client .head (
221- reverse ("view_exc_with_msg" ), headers = {"sentry-trace" : sentry_trace_header }
222- )
215+ client .head (
216+ reverse ("view_exc_with_msg" ), headers = {"sentry-trace" : sentry_trace_header }
223217 )
224218
225219 (msg_event , error_event , transaction_event ) = events
@@ -936,7 +930,7 @@ def test_render_spans(sentry_init, client, capture_events, render_span_tree):
936930
937931 for url , expected_line in views_tests :
938932 events = capture_events ()
939- unpack_werkzeug_response ( client .get (url ) )
933+ client .get (url )
940934 transaction = events [0 ]
941935 assert expected_line in render_span_tree (transaction )
942936
@@ -980,7 +974,7 @@ def test_middleware_spans(sentry_init, client, capture_events, render_span_tree)
980974 )
981975 events = capture_events ()
982976
983- unpack_werkzeug_response ( client .get (reverse ("message" ) ))
977+ client .get (reverse ("message" ))
984978
985979 message , transaction = events
986980
@@ -997,7 +991,7 @@ def test_middleware_spans_disabled(sentry_init, client, capture_events):
997991 )
998992 events = capture_events ()
999993
1000- unpack_werkzeug_response ( client .get (reverse ("message" ) ))
994+ client .get (reverse ("message" ))
1001995
1002996 message , transaction = events
1003997
@@ -1021,7 +1015,7 @@ def test_signals_spans(sentry_init, client, capture_events, render_span_tree):
10211015 )
10221016 events = capture_events ()
10231017
1024- unpack_werkzeug_response ( client .get (reverse ("message" ) ))
1018+ client .get (reverse ("message" ))
10251019
10261020 message , transaction = events
10271021
@@ -1044,7 +1038,7 @@ def test_signals_spans_disabled(sentry_init, client, capture_events):
10441038 )
10451039 events = capture_events ()
10461040
1047- unpack_werkzeug_response ( client .get (reverse ("message" ) ))
1041+ client .get (reverse ("message" ))
10481042
10491043 message , transaction = events
10501044
@@ -1074,7 +1068,7 @@ def test_signals_spans_filtering(sentry_init, client, capture_events, render_spa
10741068 )
10751069 events = capture_events ()
10761070
1077- unpack_werkzeug_response ( client .get (reverse ("send_myapp_custom_signal" ) ))
1071+ client .get (reverse ("send_myapp_custom_signal" ))
10781072
10791073 (transaction ,) = events
10801074
@@ -1202,7 +1196,7 @@ def test_span_origin(sentry_init, client, capture_events):
12021196 )
12031197 events = capture_events ()
12041198
1205- unpack_werkzeug_response ( client .get (reverse ("view_with_signal" ) ))
1199+ client .get (reverse ("view_with_signal" ))
12061200
12071201 (transaction ,) = events
12081202
@@ -1232,9 +1226,9 @@ def test_transaction_http_method_default(sentry_init, client, capture_events):
12321226 )
12331227 events = capture_events ()
12341228
1235- unpack_werkzeug_response ( client .get (reverse ("nomessage" ) ))
1236- unpack_werkzeug_response ( client .options (reverse ("nomessage" ) ))
1237- unpack_werkzeug_response ( client .head (reverse ("nomessage" ) ))
1229+ client .get (reverse ("nomessage" ))
1230+ client .options (reverse ("nomessage" ))
1231+ client .head (reverse ("nomessage" ))
12381232
12391233 (event ,) = events
12401234
@@ -1258,9 +1252,9 @@ def test_transaction_http_method_custom(sentry_init, client, capture_events):
12581252 )
12591253 events = capture_events ()
12601254
1261- unpack_werkzeug_response ( client .get (reverse ( " nomessage")) )
1262- unpack_werkzeug_response ( client .options (reverse ( " nomessage")) )
1263- unpack_werkzeug_response ( client .head (reverse ( " nomessage")) )
1255+ client .get ("/ nomessage" )
1256+ client .options ("/ nomessage" )
1257+ client .head ("/ nomessage" )
12641258
12651259 assert len (events ) == 2
12661260
0 commit comments