Mercurial > public > bravenewsurf
comparison bns_website/core/tests/view_tests.py @ 10:01740aa4a6b9
Added tests for the just added generic views.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 29 Oct 2011 22:38:18 -0500 |
parents | 71f2941161e9 |
children | a0d3bc630ebd |
comparison
equal
deleted
inserted
replaced
9:f2cb9b2ec552 | 10:01740aa4a6b9 |
---|---|
14 | 14 |
15 """ | 15 """ |
16 response = self.client.get(reverse('home')) | 16 response = self.client.get(reverse('home')) |
17 self.assertEqual(response.status_code, 200) | 17 self.assertEqual(response.status_code, 200) |
18 self.assertTemplateUsed(response, 'home.html') | 18 self.assertTemplateUsed(response, 'home.html') |
19 | |
20 def test_music(self): | |
21 """ | |
22 Tests the music page to ensure it displays without errors. | |
23 | |
24 """ | |
25 response = self.client.get(reverse('music')) | |
26 self.assertEqual(response.status_code, 200) | |
27 self.assertTemplateUsed(response, 'music.html') | |
28 | |
29 def test_video(self): | |
30 """ | |
31 Tests the video page to ensure it displays without errors. | |
32 | |
33 """ | |
34 response = self.client.get(reverse('videos')) | |
35 self.assertEqual(response.status_code, 200) | |
36 self.assertTemplateUsed(response, 'videos.html') | |
37 | |
38 def test_buy(self): | |
39 """ | |
40 Tests the buy page to ensure it displays without errors. | |
41 | |
42 """ | |
43 response = self.client.get(reverse('buy')) | |
44 self.assertEqual(response.status_code, 200) | |
45 self.assertTemplateUsed(response, 'buy.html') |