From 6f16e20bf623d9d4473715a29d41385c22dac3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 2 Jun 2017 16:03:45 +0200 Subject: [PATCH] Flask Request.json() is deprecated, use get_json() instead. See http://flask.pocoo.org/docs/0.12/api/#flask.Request.json --- pillar/tests/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pillar/tests/__init__.py b/pillar/tests/__init__.py index 9d7e3418..1e902259 100644 --- a/pillar/tests/__init__.py +++ b/pillar/tests/__init__.py @@ -456,12 +456,13 @@ class AbstractPillarTest(TestMinimal): expected_status, resp.status_code, resp.data )) - def json(): + def get_json(): if resp.mimetype != 'application/json': raise TypeError('Unable to load JSON from mimetype %r' % resp.mimetype) return mod_json.loads(resp.data) - resp.json = json + resp.json = get_json + resp.get_json = get_json return resp