Ejemplo n.º 1
0
    def test_question_updated_date_clean_content(self):
        """Cleaning the question's content does not affect its updated date."""
        t = TikiThread.objects.filter(threadId=728030)[0]
        q = create_question(t)

        clean_question_content(q)
        eq_(datetime.fromtimestamp(t.commentDate), q.updated)
Ejemplo n.º 2
0
    def test_clean_question_content(self):
        """Question content is cleaned up."""
        t = TikiThread.objects.filter(threadId=728030)[0]
        q = create_question(t)

        clean_question_content(q)

        # Check content is clean
        eq_(True, q.content.startswith('Upon installation on my 3G'))
        eq_(True, q.content.endswith('Firefox opened'))