App Engine Python SDK version 1.7.4 (2)
[gae.git] / python / lib / django_1_4 / django / contrib / messages / tests / middleware.py
blob5618c2d2b2b7ee4cf0195060cdd8d8e0e18d974d
1 from django import http
2 from django.contrib.messages.middleware import MessageMiddleware
3 from django.utils import unittest
6 class MiddlewareTest(unittest.TestCase):
8 def setUp(self):
9 self.middleware = MessageMiddleware()
11 def test_response_without_messages(self):
12 """
13 Makes sure that the response middleware is tolerant of messages not
14 existing on request.
15 """
16 request = http.HttpRequest()
17 response = http.HttpResponse()
18 self.middleware.process_response(request, response)