| author | ymh <ymh.work@gmail.com> |
| Fri, 04 Mar 2011 16:45:48 +0100 | |
| changeset 57 | 1984c3b5f299 |
| parent 29 | cc9b7e14412b |
| permissions | -rw-r--r-- |
import unittest from django import http from django.contrib.messages.middleware import MessageMiddleware class MiddlewareTest(unittest.TestCase): def setUp(self): self.middleware = MessageMiddleware() def test_response_without_messages(self): """ Makes sure that the response middleware is tolerant of messages not existing on request. """ request = http.HttpRequest() response = http.HttpResponse() self.middleware.process_response(request, response)