def test_show_message_twice(view):
 view.show_message(usertypes.MessageLevel.info, 'test')
 view.show_message(usertypes.MessageLevel.info, 'test')
 assert (len(view._messages) == 1)

def test_show_message_twice ( view ) : view . show_message ( usertypes . MessageLevel . info , 'test' ) view . show_message ( usertypes . MessageLevel . info , 'test' ) assert ( len ( view . _messages ) == 1 )
show the same message twice -> only one should be shown .