You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
332 B
9 lines
332 B
from .api import get_messages
|
|
|
|
|
|
class MessagesTestMixin:
|
|
def assertMessages(self, response, expected_messages, *, ordered=True):
|
|
request_messages = list(get_messages(response.wsgi_request))
|
|
assertion = self.assertEqual if ordered else self.assertCountEqual
|
|
assertion(request_messages, expected_messages)
|