Ejemplo n.º 1
0
    def test_question_spam_is_unindexed(self):
        search = QuestionMappingType.search()

        q = QuestionFactory(title='I am spam')
        self.refresh()
        eq_(search.query(question_title__match='spam').count(), 1)

        q.is_spam = True
        q.save()
        self.refresh()
        eq_(search.query(question_title__match='spam').count(), 0)
Ejemplo n.º 2
0
    def test_question_spam_is_unindexed(self):
        search = QuestionMappingType.search()

        q = QuestionFactory(title=u'I am spam')
        self.refresh()
        eq_(search.query(question_title__match='spam').count(), 1)

        q.is_spam = True
        q.save()
        self.refresh()
        eq_(search.query(question_title__match='spam').count(), 0)