bgneal@3: """ bgneal@3: Core (non-application specific) view tests. bgneal@3: bgneal@3: """ bgneal@3: from django.test import TestCase bgneal@3: from django.core.urlresolvers import reverse bgneal@3: bgneal@3: bgneal@3: class ViewTest(TestCase): bgneal@3: bgneal@3: def test_home(self): bgneal@3: """ bgneal@3: Tests the home page to ensure it displays without errors. bgneal@3: bgneal@3: """ bgneal@3: response = self.client.get(reverse('home')) bgneal@3: self.assertEqual(response.status_code, 200) bgneal@3: self.assertTemplateUsed(response, 'home.html') bgneal@10: bgneal@10: def test_music(self): bgneal@10: """ bgneal@10: Tests the music page to ensure it displays without errors. bgneal@10: bgneal@10: """ bgneal@10: response = self.client.get(reverse('music')) bgneal@10: self.assertEqual(response.status_code, 200) bgneal@10: self.assertTemplateUsed(response, 'music.html') bgneal@10: bgneal@10: def test_buy(self): bgneal@10: """ bgneal@10: Tests the buy page to ensure it displays without errors. bgneal@10: bgneal@10: """ bgneal@10: response = self.client.get(reverse('buy')) bgneal@10: self.assertEqual(response.status_code, 200) bgneal@10: self.assertTemplateUsed(response, 'buy.html')