@@ -198,7 +198,7 @@ def test_capture_request_if_available_and_send_pii_is_on(
198198 client = client_factory (schema )
199199
200200 query = "query ErrorQuery { error }"
201- client .post ("/graphql" , json = {"query" : query , "operationName" : "ErrorQuery" }).get_data ()
201+ client .post ("/graphql" , json = {"query" : query , "operationName" : "ErrorQuery" }).close ()
202202
203203 assert len (events ) == 1
204204
@@ -253,7 +253,7 @@ def test_do_not_capture_request_if_send_pii_is_off(
253253 client = client_factory (schema )
254254
255255 query = "query ErrorQuery { error }"
256- client .post ("/graphql" , json = {"query" : query , "operationName" : "ErrorQuery" }).get_data ()
256+ client .post ("/graphql" , json = {"query" : query , "operationName" : "ErrorQuery" }).close ()
257257
258258 assert len (events ) == 1
259259
@@ -293,7 +293,7 @@ def test_breadcrumb_no_operation_name(
293293 client = client_factory (schema )
294294
295295 query = "{ error }"
296- client .post ("/graphql" , json = {"query" : query }).get_data ()
296+ client .post ("/graphql" , json = {"query" : query }).close ()
297297
298298 assert len (events ) == 1
299299
@@ -332,7 +332,7 @@ def test_capture_transaction_on_error(
332332 client = client_factory (schema )
333333
334334 query = "query ErrorQuery { error }"
335- client .post ("/graphql" , json = {"query" : query , "operationName" : "ErrorQuery" }).get_data ()
335+ client .post ("/graphql" , json = {"query" : query , "operationName" : "ErrorQuery" }).close ()
336336
337337 assert len (events ) == 2
338338 (_ , transaction_event ) = events
@@ -409,7 +409,7 @@ def test_capture_transaction_on_success(
409409 client = client_factory (schema )
410410
411411 query = "query GreetingQuery { hello }"
412- client .post ("/graphql" , json = {"query" : query , "operationName" : "GreetingQuery" }).get_data ()
412+ client .post ("/graphql" , json = {"query" : query , "operationName" : "GreetingQuery" }).close ()
413413
414414 assert len (events ) == 1
415415 (transaction_event ,) = events
@@ -486,7 +486,7 @@ def test_transaction_no_operation_name(
486486 client = client_factory (schema )
487487
488488 query = "{ hello }"
489- client .post ("/graphql" , json = {"query" : query }).get_data ()
489+ client .post ("/graphql" , json = {"query" : query }).close ()
490490
491491 assert len (events ) == 1
492492 (transaction_event ,) = events
@@ -566,7 +566,7 @@ def test_transaction_mutation(
566566 client = client_factory (schema )
567567
568568 query = 'mutation Change { change(attribute: "something") }'
569- client .post ("/graphql" , json = {"query" : query }).get_data ()
569+ client .post ("/graphql" , json = {"query" : query }).close ()
570570
571571 assert len (events ) == 1
572572 (transaction_event ,) = events
@@ -641,7 +641,7 @@ def test_handle_none_query_gracefully(
641641 client_factory = request .getfixturevalue (client_factory )
642642 client = client_factory (schema )
643643
644- client .post ("/graphql" , json = {}).get_data ()
644+ client .post ("/graphql" , json = {}).close ()
645645
646646 assert len (events ) == 0 , "expected no events to be sent to Sentry"
647647
@@ -673,7 +673,7 @@ def test_span_origin(
673673 client = client_factory (schema )
674674
675675 query = 'mutation Change { change(attribute: "something") }'
676- client .post ("/graphql" , json = {"query" : query }).get_data ()
676+ client .post ("/graphql" , json = {"query" : query }).close ()
677677
678678 (event ,) = events
679679
@@ -715,7 +715,7 @@ def test_span_origin2(
715715 client = client_factory (schema )
716716
717717 query = "query GreetingQuery { hello }"
718- client .post ("/graphql" , json = {"query" : query , "operationName" : "GreetingQuery" }).get_data ()
718+ client .post ("/graphql" , json = {"query" : query , "operationName" : "GreetingQuery" }).close ()
719719
720720 (event ,) = events
721721
@@ -757,7 +757,7 @@ def test_span_origin3(
757757 client = client_factory (schema )
758758
759759 query = "subscription { messageAdded { content } }"
760- client .post ("/graphql" , json = {"query" : query }).get_data ()
760+ client .post ("/graphql" , json = {"query" : query }).close ()
761761
762762 (event ,) = events
763763
0 commit comments