def test_index_page(self): c = Command() c.publish() resp = self.client.get(reverse('index')) self.assertContains(resp, 'Another competition') self.assertContains(resp, 'Where are you')
def test_competition_publishing(self): c = Command() self.assertFalse(YourStoryCompetition.objects.latest().published) c.publish() self.assertTrue(YourStoryCompetition.objects.latest().published) c.retract() self.assertFalse(YourStoryCompetition.objects.latest().published)