@@ -394,6 +394,7 @@ def index():
394394 client = app .test_client ()
395395 response = client .post ("/" , data = data )
396396 assert response .status_code == 200
397+ response .close ()
397398
398399 event , transaction_event = events
399400
@@ -746,6 +747,7 @@ def hi_tx():
746747 with app .test_client () as client :
747748 response = client .get ("/message_tx" )
748749 assert response .status_code == 200
750+ response .close ()
749751
750752 message_event , transaction_event = events
751753
@@ -938,7 +940,8 @@ def test_response_status_code_not_found_in_transaction_context(
938940 envelopes = capture_envelopes ()
939941
940942 client = app .test_client ()
941- client .get ("/not-existing-route" )
943+ response = client .get ("/not-existing-route" )
944+ response .close ()
942945
943946 sentry_sdk .get_client ().flush ()
944947
@@ -983,14 +986,18 @@ def test_transaction_http_method_default(
983986 events = capture_events ()
984987
985988 client = app .test_client ()
989+
986990 response = client .get ("/nomessage" )
987991 assert response .status_code == 200
992+ response .close ()
988993
989994 response = client .options ("/nomessage" )
990995 assert response .status_code == 200
996+ response .close ()
991997
992998 response = client .head ("/nomessage" )
993999 assert response .status_code == 200
1000+ response .close ()
9941001
9951002 (event ,) = events
9961003
@@ -1020,14 +1027,18 @@ def test_transaction_http_method_custom(
10201027 events = capture_events ()
10211028
10221029 client = app .test_client ()
1030+
10231031 response = client .get ("/nomessage" )
10241032 assert response .status_code == 200
1033+ response .close ()
10251034
10261035 response = client .options ("/nomessage" )
10271036 assert response .status_code == 200
1037+ response .close ()
10281038
10291039 response = client .head ("/nomessage" )
10301040 assert response .status_code == 200
1041+ response .close ()
10311042
10321043 assert len (events ) == 2
10331044
0 commit comments