# HG changeset patch # User Marcin Kuzminski # Date 2017-01-12 22:46:43 # Node ID c1381149ec00db1fa408f35ba5c7580a3fa01db3 # Parent 69141fb5e3801dcf59c0a61df5ac422a3ba6fb68 tests: improve debugging of failed flash messages. diff --git a/rhodecode/tests/__init__.py b/rhodecode/tests/__init__.py --- a/rhodecode/tests/__init__.py +++ b/rhodecode/tests/__init__.py @@ -231,9 +231,11 @@ def assert_session_flash(response=None, message_text = _eval_if_lazy(message.message) if msg not in message_text: - msg = u'msg `%s` not found in session flash: got `%s` instead' % ( - msg, message_text) - pytest.fail(safe_str(msg)) + fail_msg = u'msg `%s` not found in session ' \ + u'flash: got `%s` (type:%s) instead' % ( + msg, message_text, type(message_text)) + + pytest.fail(safe_str(fail_msg)) if category: assert category == message.category