Skip to content

Commit 842df5e

Browse files
authored
fix(tests): Fix trytond tests (#3031)
1 parent 099f6d7 commit 842df5e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/integrations/trytond/test_trytond.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
from trytond.wsgi import app as trytond_app
1212

1313
from werkzeug.test import Client
14+
1415
from sentry_sdk.integrations.trytond import TrytondWSGIIntegration
16+
from tests.conftest import unpack_werkzeug_response
1517

1618

1719
@pytest.fixture(scope="function")
@@ -118,8 +120,8 @@ def _(app, request, e):
118120
"/rpcerror", content_type="application/json", data=json.dumps(_data)
119121
)
120122

121-
(content, status, headers) = response
122-
data = json.loads(next(content))
123+
(content, status, headers) = unpack_werkzeug_response(response)
124+
data = json.loads(content)
123125
assert status == "200 OK"
124126
assert headers.get("Content-Type") == "application/json"
125127
assert data == dict(id=42, error=["UserError", ["Sentry error.", "foo", None]])

tox.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,16 +569,14 @@ deps =
569569
tornado-latest: tornado
570570

571571
# Trytond
572+
trytond: werkzeug
573+
trytond-v4: werkzeug<1.0
572574
trytond-v4: trytond~=4.0
573575
trytond-v5: trytond~=5.0
574576
trytond-v6: trytond~=6.0
575577
trytond-v7: trytond~=7.0
576578
trytond-latest: trytond
577579

578-
trytond-v{4}: werkzeug<1.0
579-
trytond-v{5,6,7}: werkzeug<2.0
580-
trytond-latest: werkzeug<2.0
581-
582580
setenv =
583581
PYTHONDONTWRITEBYTECODE=1
584582
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

0 commit comments

Comments
 (0)