Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)