tests: update error email for new py3 exception value (#36515)

This commit is contained in:
Frédéric Péters 2019-11-16 20:30:59 +01:00
parent a923e056ea
commit 88d47903d1
1 changed files with 4 additions and 1 deletions

View File

@ -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']