| author | ymh <ymh.work@gmail.com> |
| Wed, 02 Jun 2010 18:57:35 +0200 | |
| changeset 38 | 77b6da96e6f1 |
| 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)