annotate bns_website/reviews/tests.py @ 34:37d9b6b1a097

Added reviews template tag. Fix ordering of reviews. Tweaked the display of the reviews page. Addresses ticket 2.
author Chris Ridgway <ckridgway@gmail.com>
date Sat, 05 Nov 2011 23:53:10 -0500
parents 71f2beb03789
children 5992b6b1bcd2
rev   line source
ckridgway@16 1 """
ckridgway@34 2 Reviews application view tests.
ckridgway@16 3
ckridgway@16 4 """
ckridgway@34 5 from django.test import TestCase
ckridgway@34 6 from django.core.urlresolvers import reverse
ckridgway@16 7
ckridgway@16 8
ckridgway@34 9 class ViewTest(TestCase):
ckridgway@16 10
ckridgway@34 11 def test_home(self):
ckridgway@16 12 """
ckridgway@34 13 Tests the home page to ensure it displays without errors.
ckridgway@34 14
ckridgway@16 15 """
ckridgway@34 16 response = self.client.get(reverse('reviews'))
ckridgway@34 17 self.assertEqual(response.status_code, 200)
ckridgway@34 18 self.assertTemplateUsed(response, 'reviews/review_list.html')