diff --git a/tests/integrations/trytond/test_trytond.py b/tests/integrations/trytond/test_trytond.py index 870b6ccf96..f4ae81f3fa 100644 --- a/tests/integrations/trytond/test_trytond.py +++ b/tests/integrations/trytond/test_trytond.py @@ -11,7 +11,9 @@ from trytond.wsgi import app as trytond_app from werkzeug.test import Client + from sentry_sdk.integrations.trytond import TrytondWSGIIntegration +from tests.conftest import unpack_werkzeug_response @pytest.fixture(scope="function") @@ -118,8 +120,8 @@ def _(app, request, e): "/rpcerror", content_type="application/json", data=json.dumps(_data) ) - (content, status, headers) = response - data = json.loads(next(content)) + (content, status, headers) = unpack_werkzeug_response(response) + data = json.loads(content) assert status == "200 OK" assert headers.get("Content-Type") == "application/json" assert data == dict(id=42, error=["UserError", ["Sentry error.", "foo", None]]) diff --git a/tox.ini b/tox.ini index 32794326a7..409e8d70b0 100644 --- a/tox.ini +++ b/tox.ini @@ -569,16 +569,14 @@ deps = tornado-latest: tornado # Trytond + trytond: werkzeug + trytond-v4: werkzeug<1.0 trytond-v4: trytond~=4.0 trytond-v5: trytond~=5.0 trytond-v6: trytond~=6.0 trytond-v7: trytond~=7.0 trytond-latest: trytond - trytond-v{4}: werkzeug<1.0 - trytond-v{5,6,7}: werkzeug<2.0 - trytond-latest: werkzeug<2.0 - setenv = PYTHONDONTWRITEBYTECODE=1 OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES