(self)
| 103 | |
| 104 | class AssertMessagesTest(MessagesTestMixin, SimpleTestCase): |
| 105 | def test_assertion(self): |
| 106 | response = FakeResponse() |
| 107 | add_message(response.wsgi_request, constants.DEBUG, "DEBUG message.") |
| 108 | add_message(response.wsgi_request, constants.INFO, "INFO message.") |
| 109 | add_message(response.wsgi_request, constants.SUCCESS, "SUCCESS message.") |
| 110 | add_message(response.wsgi_request, constants.WARNING, "WARNING message.") |
| 111 | add_message(response.wsgi_request, constants.ERROR, "ERROR message.") |
| 112 | self.assertMessages( |
| 113 | response, |
| 114 | [ |
| 115 | Message(constants.DEBUG, "DEBUG message."), |
| 116 | Message(constants.INFO, "INFO message."), |
| 117 | Message(constants.SUCCESS, "SUCCESS message."), |
| 118 | Message(constants.WARNING, "WARNING message."), |
| 119 | Message(constants.ERROR, "ERROR message."), |
| 120 | ], |
| 121 | ) |
| 122 | |
| 123 | def test_with_tags(self): |
| 124 | response = FakeResponse() |
nothing calls this directly
no test coverage detected