view bns_website/bands/tests/view_tests.py @ 62:93e9e7b3d2ae

Put in an import dance for Python 2.5. Apparently cgi.parse_qs was copied to urlparse in Python 2.6. So look for it first in urlparse, and if not found, try cgi.
author Brian Neal <bgneal@gmail.com>
date Sat, 19 Nov 2011 14:47:17 -0600
parents 5992b6b1bcd2
children
line wrap: on
line source
"""
Bands application view tests.

"""
from django.test import TestCase
from django.core.urlresolvers import reverse


class ViewTest(TestCase):

    def test_bands(self):
        """
        Tests the bands page to ensure it displays without errors.

        """
        response = self.client.get(reverse('bands'))
        self.assertEqual(response.status_code, 200)
        self.assertTemplateUsed(response, 'bands/band_list.html')