def test_no_dupes():
 request = HttpRequest()
 setattr(request, '_messages', default_storage(request))
 info(request, 'Title', 'Body')
 info(request, 'Title', 'Body')
 info(request, 'Another Title', 'Another Body')
 storage = django_messages.get_messages(request)
 assert (len(storage) == 2), 'Too few or too many messages recorded.'

def test_no_dupes ( ) : request = HttpRequest ( ) setattr ( request , '_messages' , default_storage ( request ) ) info ( request , 'Title' , 'Body' ) info ( request , 'Title' , 'Body' ) info ( request , 'Another Title' , 'Another Body' ) storage = django_messages . get_messages ( request ) assert ( len ( storage ) == 2 ) , 'Too few or too many messages recorded.'
test that duplicate messages arent saved .