Skip to content

Commit 4cf8e05

Browse files
committed
...
1 parent 062942d commit 4cf8e05

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tests/integrations/trytond/test_trytond.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,14 @@ def _(app, request, e):
122122
)
123123

124124
(event,) = events
125-
(content, status, headers) = response
126-
data = json.loads(next(content))
125+
if hasattr(response, "status"):
126+
status = response.status
127+
data = response.get_data()
128+
headers = response.headers
129+
else:
130+
(content, status, headers) = response
131+
data = json.loads(next(content))
132+
127133
assert status == "200 OK"
128134
assert headers.get("Content-Type") == "application/json"
129135
assert data == dict(id=42, error=["UserError", [event["event_id"], "foo", None]])

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ deps =
295295

296296
{py3.5}-celery: newrelic<6.0.0
297297
{py3.7}-celery: importlib-metadata<5.0
298-
{py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-celery: newrelic
298+
{py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-celery: newrelic<7.0.0
299299

300300
# Chalice
301301
chalice-v1.16: chalice~=1.16.0

0 commit comments

Comments
 (0)