def test_render_polls_secret_closed(self):
        """
        Should display the results when poll is secret and is closed
        """
        comment = utils.create_comment(topic=self.topic, comment_html="<poll name=bar>")
        yesterday = timezone.now() - timezone.timedelta(days=1)
        CommentPoll.objects.create(comment=comment, name='bar', mode=PollMode.SECRET, close_at=yesterday)
        user_comment_with_polls = comment.__class__.objects\
            .filter(pk=comment.pk)\
            .with_polls(self.user)\
            .first()

        out = Template(
            "{% load spirit_tags %}"
            "{% post_render_comment comment=comment %}"
        ).render(Context({'comment': user_comment_with_polls, 'request': self.request, 'csrf_token': 'foo'}))
        self.assertNotEqual(out.strip(), "")
        self.assertFalse('show_poll=' in out)
        self.assertFalse(out in 'form')
        self.assertTrue('comment-poll' in out)
dataset/ETHPy150Open nitely/Spirit/spirit/comment/poll/tests.py/CommentPollTemplateTagsTest.test_render_polls_secret_closed/swapped operands of `in`