

def test_ok(self):
    msg = 'some message'
    self.request._messages = self.storage
    messages.add_message(self.request, messages.DEBUG, msg)
    self.assertIn(msg, self.storage.store)

dataset/ETHPy150Open django/django/tests/messages_tests/test_api.py ApiTest.test_ok/original