def test_list_excludes_answered(self): Util.new_question(self.user) q2 = Util.new_question(self.user) self.assertEquals(Question.latest(), q2) q2.is_answered = True q2.save() self.assertNotEquals(Question.latest(), q2)
def test_list_excludes_nonpublished(self): Util.new_question(self.user) q2 = Util.new_question(self.user) self.assertEquals(Question.latest(), q2) q2.is_published = False q2.save() self.assertNotEquals(Question.latest(), q2)