Package madrona :: Package simplefaq :: Module tests
[hide private]

Source Code for Module madrona.simplefaq.tests

 1  """ 
 2  This file demonstrates two different styles of tests (one doctest and one 
 3  unittest). These will both pass when you run "manage.py test". 
 4   
 5  Replace these with more appropriate tests for your application. 
 6  """ 
 7   
 8  from django.test import TestCase, Client 
 9  from madrona.simplefaq.models import * 
10  from django.conf import settings 
11  from django.conf.urls.defaults import * 
12   
13 -class SimpleFaqTest(TestCase):
14 fixtures = ['example_data'] 15
16 - def testFaqItemsPresent(self):
17 """ 18 Check presence of initial FaqGroup and Faq 19 """ 20 self.assertTrue(FaqGroup.objects.count() > 0) 21 self.assertTrue(Faq.objects.count() > 0)
22
23 - def testFaqView(self):
24 """ 25 test views.faq 26 """ 27 response = self.client.get('/faq/', {}) 28 self.assertEquals(response.status_code, 200)
29