~ubuntu-branches/debian/sid/python-django/sid

« back to all changes in this revision

Viewing changes to django/contrib/messages/tests/middleware.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2013-11-07 15:33:49 UTC
  • mfrom: (1.3.12)
  • Revision ID: package-import@ubuntu.com-20131107153349-e31sc149l2szs3jb
Tags: 1.6-1
* New upstream version. Closes: #557474, #724637.
* python-django now also suggests the installation of ipython,
  bpython, python-django-doc, and libgdal1.
  Closes: #636511, #686333, #704203
* Set package maintainer to Debian Python Modules Team.
* Bump standards version to 3.9.5, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from django import http
2
 
from django.contrib.messages.middleware import MessageMiddleware
3
 
from django.utils import unittest
4
 
 
5
 
 
6
 
class MiddlewareTest(unittest.TestCase):
7
 
 
8
 
    def setUp(self):
9
 
        self.middleware = MessageMiddleware()
10
 
 
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)