From fe1bbcede0e6c9f9562f477d24a1dac9a42a2d38 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: May 21 2018 12:09:06 +0000 Subject: Fix failing JSON payload test When payload is invalid JSON, instead of expected error message: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0) following message is now received: Failed to decode JSON object: No JSON object could be decoded Not sure what why this changed, possibly because of some upgraded dependency. --- diff --git a/functional-tests/test_api_v1.py b/functional-tests/test_api_v1.py index 924c57e..e6aa784 100644 --- a/functional-tests/test_api_v1.py +++ b/functional-tests/test_api_v1.py @@ -157,8 +157,7 @@ def test_invalid_payload(requests_session, greenwave_server): headers={'Content-Type': 'application/json'}, data='not a json') assert r.status_code == 400 - expected = "Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)" - assert expected == r.json()['message'] + assert "Failed to decode JSON object" in r.json()['message'] def test_make_a_decision_on_passed_result(requests_session, greenwave_server, testdatabuilder):