From 88d47903d112ee0c4cd449ca8c166762cb4444b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 16 Nov 2019 20:30:59 +0100 Subject: [PATCH] tests: update error email for new py3 exception value (#36515) --- tests/test_backoffice_pages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_backoffice_pages.py b/tests/test_backoffice_pages.py index 24dea21de..7326e3c13 100644 --- a/tests/test_backoffice_pages.py +++ b/tests/test_backoffice_pages.py @@ -2714,7 +2714,10 @@ def test_backoffice_wscall_error_email(http_requests, pub, emails): assert 'Error during webservice call' in resp.text # check email box - error_email = emails.get('[ERROR] [WSCALL] ValueError: No JSON object could be decoded') + if six.PY2: + error_email = emails.get('[ERROR] [WSCALL] ValueError: No JSON object could be decoded') + else: + error_email = emails.get('[ERROR] [WSCALL] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)') assert '/form-title/%s/' % number31.id in error_email['payload'] assert error_email['msg']['References']