From eca1f5c3996b45a4f4aa1c8df3506738201c5daf Mon Sep 17 00:00:00 2001 From: medmunds Date: Thu, 11 Oct 2018 16:47:10 -0700 Subject: [PATCH] SparkPost: update backend tests with 1/2019 error format. Update SparkPost backend tests to follow 1/2019 changes to Transmissions API error reporting format. (No changes are required in the Anymail backend.) See #123 --- tests/test_sparkpost_backend.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_sparkpost_backend.py b/tests/test_sparkpost_backend.py index c3e0e59..74826f3 100644 --- a/tests/test_sparkpost_backend.py +++ b/tests/test_sparkpost_backend.py @@ -315,10 +315,11 @@ class SparkPostBackendStandardEmailTests(SparkPostBackendMockAPITestCase): def test_api_error_includes_details(self): """AnymailAPIError should include ESP's error message""" - failure_response = b"""{ "errors": [ { - "message": "Something went wrong", - "description": "Helpful explanation from your ESP" - } ] }""" + failure_response = b"""{ + "errors": [{ + "message": "Helpful explanation from your ESP" + }] + }""" self.set_mock_failure(raw=failure_response) with self.assertRaisesMessage(AnymailAPIError, "Helpful explanation from your ESP"): self.message.send()