| author | ymh <ymh.work@gmail.com> |
| Mon, 31 May 2010 11:14:39 +0200 | |
| changeset 32 | e28089cee66c |
| 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)