annotate bns_website/core/tests/view_tests.py @ 51:6c7467599fa9

I added the jquery plugin jplayer to use for playing samples of the album. For now I just used some of the songs linked to by the jplayer demo, but I also picked a couple songs at random from my iTunes library. Rather than add them to the repository I just named them 1.mp3, 1.m4a, 1.ogg and 2.mp3, 2.m4a, 2.ogg and anybody that wants to test the player will have to add some random songs themselves. I only added the "blue monday" player skin because I personally think it looks the best of the examples they supply, but we could change that or roll our own if needed.
author Bob Mourlam <bob.mourlam@gmail.com>
date Sun, 13 Nov 2011 17:01:36 -0600
parents 01740aa4a6b9
children a0d3bc630ebd
rev   line source
bgneal@3 1 """
bgneal@3 2 Core (non-application specific) view tests.
bgneal@3 3
bgneal@3 4 """
bgneal@3 5 from django.test import TestCase
bgneal@3 6 from django.core.urlresolvers import reverse
bgneal@3 7
bgneal@3 8
bgneal@3 9 class ViewTest(TestCase):
bgneal@3 10
bgneal@3 11 def test_home(self):
bgneal@3 12 """
bgneal@3 13 Tests the home page to ensure it displays without errors.
bgneal@3 14
bgneal@3 15 """
bgneal@3 16 response = self.client.get(reverse('home'))
bgneal@3 17 self.assertEqual(response.status_code, 200)
bgneal@3 18 self.assertTemplateUsed(response, 'home.html')
bgneal@10 19
bgneal@10 20 def test_music(self):
bgneal@10 21 """
bgneal@10 22 Tests the music page to ensure it displays without errors.
bgneal@10 23
bgneal@10 24 """
bgneal@10 25 response = self.client.get(reverse('music'))
bgneal@10 26 self.assertEqual(response.status_code, 200)
bgneal@10 27 self.assertTemplateUsed(response, 'music.html')
bgneal@10 28
bgneal@10 29 def test_video(self):
bgneal@10 30 """
bgneal@10 31 Tests the video page to ensure it displays without errors.
bgneal@10 32
bgneal@10 33 """
bgneal@10 34 response = self.client.get(reverse('videos'))
bgneal@10 35 self.assertEqual(response.status_code, 200)
bgneal@10 36 self.assertTemplateUsed(response, 'videos.html')
bgneal@10 37
bgneal@10 38 def test_buy(self):
bgneal@10 39 """
bgneal@10 40 Tests the buy page to ensure it displays without errors.
bgneal@10 41
bgneal@10 42 """
bgneal@10 43 response = self.client.get(reverse('buy'))
bgneal@10 44 self.assertEqual(response.status_code, 200)
bgneal@10 45 self.assertTemplateUsed(response, 'buy.html')