def test_poll_can_show_results(self):
        """
        Should return whether the poll results can be shown or not depending on the mode
        """
        poll = CommentPoll.objects.create(comment=self.comment, name='bar')
        self.assertTrue(poll.can_show_results)
        poll.mode = PollMode.SECRET
        self.assertFalse(poll.can_show_results)
        yesterday = timezone.now() - timezone.timedelta(days=1)
        poll.close_at = yesterday
        self.assertTrue(poll.can_show_results)
dataset/ETHPy150Open nitely/Spirit/spirit/comment/poll/tests.py/PollModelsTest.test_poll_can_show_results/original