1 from django.test import TestCase
2 from migdal.models import Entry
5 class MigdalTests(TestCase):
8 type='info', author='An author',
9 published_pl=True, title_pl='An info entry', slug_pl='test1',
10 body_pl='**Test text**',
13 type='blog', author='An author',
14 published_pl=True, title_pl='A blog entry', slug_pl='test2',
15 body_pl='**Test blog text**',
19 response = self.client.get('/')
20 self.assertContains(response, 'A blog entry')
21 self.assertNotContains(response, 'An info entry')
25 response = self.client.get('/info/')
26 self.assertContains(response, 'An info entry')
28 response = self.client.get('/info/test1/')
29 self.assertContains(response, '<b>Test text</b>')