(self)
| 163 | self.assertMessages(response, [Message(42, "CUSTOM message.")]) |
| 164 | |
| 165 | def test_ordered(self): |
| 166 | response = FakeResponse() |
| 167 | add_message(response.wsgi_request, constants.INFO, "First message.") |
| 168 | add_message(response.wsgi_request, constants.WARNING, "Second message.") |
| 169 | expected_messages = [ |
| 170 | Message(constants.WARNING, "Second message."), |
| 171 | Message(constants.INFO, "First message."), |
| 172 | ] |
| 173 | self.assertMessages(response, expected_messages, ordered=False) |
| 174 | with self.assertRaisesMessage(AssertionError, "Lists differ: "): |
| 175 | self.assertMessages(response, expected_messages) |
| 176 | |
| 177 | def test_mismatching_length(self): |
| 178 | response = FakeResponse() |
nothing calls this directly
no test coverage detected