In my django application, I\'m trying to write a unit test that performs an action and then checks the messages in the response.
As far as I can tell, there is no n
From django documentation:
Outside of templates, you can use get_messages()
So, you could write something like:
from django.contrib.messages import get_messages [...] messages = [m.message for m in get_messages(response.wsgi_request)] self.assertIn('My message', messages)