##// END OF EJS Templates
tests: improve assert_flash_message call when called with no_ and empty flash is present.
marcink -
r2349:d77ebe76 default
parent child Browse files
Show More
@@ -208,7 +208,11 b' def assert_session_flash(response, msg=N'
208 messages = flash.pop_messages(session=session)
208 messages = flash.pop_messages(session=session)
209 msg = _eval_if_lazy(msg)
209 msg = _eval_if_lazy(msg)
210
210
211 assert messages, 'unable to find message `%s` in empty flash list' % msg
211 if no_:
212 error_msg = 'unable to detect no_ message `%s` in empty flash list' % no_
213 else:
214 error_msg = 'unable to find message `%s` in empty flash list' % msg
215 assert messages, error_msg
212 message = messages[0]
216 message = messages[0]
213
217
214 message_text = _eval_if_lazy(message.message) or ''
218 message_text = _eval_if_lazy(message.message) or ''
General Comments 0
You need to be logged in to leave comments. Login now