1 from django
import http
2 from django
.contrib
.messages
.middleware
import MessageMiddleware
3 from django
.utils
import unittest
6 class MiddlewareTest(unittest
.TestCase
):
9 self
.middleware
= MessageMiddleware()
11 def test_response_without_messages(self
):
13 Makes sure that the response middleware is tolerant of messages not
16 request
= http
.HttpRequest()
17 response
= http
.HttpResponse()
18 self
.middleware
.process_response(request
, response
)