예제 #1
0
 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')
예제 #2
0
    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)