| author | ymh <ymh.work@gmail.com> |
| Thu, 05 Aug 2010 17:28:09 +0200 | |
| changeset 50 | 012451a812f1 |
| 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)